Kotlin Standard Delegates - Lazy, Observable and Vetoable
Вставка
- Опубліковано 23 лип 2024
- This is the final video about Kotlin Delegates. So far we have learned about Delegation Pattern, we also learned how it is super easy to make delegation in Kotlin as it supports it natively. And we also created some Delegates.
In this video we will learn about the Delegates that are predefined in Kotlin Standard Library.
0:00 Introduction
0:44 Lazy Delegate
4:12 Observable Delegate
6:35 Vetoable Delegate
If you are having difficulties navigating from one lesson to another, then click on this link and it will open the complete playlist of this Kotlin Object Oriented Programming. In this playlist all lessons are already arranged in chronological order.
👉 bit.ly/3lMLtpj
All the codes about this Kotlin Android Tutorial for Beginners are organized sequentially in this repository
👉 bit.ly/2UoyiQf
And if you need more support, then you can join the Simplified Coding’s Quora Space to post your questions.
👉 www.quora.com/q/simplifiedcoding
If you want to get in touch with me; you can find my contact details here:
👉 www.simplifiedcoding.net/about/
Finally, If you love my content please SHARE my courses to your friends. You can share this course to your Facebook, WhatsApp etc.
For more contents related to Software Development visit my website.
👉 www.simplifiedcoding.net
You can SUPPORT me if you want
👉 Patreon: / belalkhan
👉 UPI (India Only): probelalkhan@okaxis
👉 PayTM (India Only): +917549161079
👉 PayPal: www.paypal.me/probelalkhan
You can also check some of my other courses from these links
👉 Android MVVM Tutorial: bit.ly/3iLfVzu
👉 Android Game Development Tutorial: bit.ly/38JmltC
👉 Retrofit Android Tutorial: bit.ly/2DEwAl1
👉 Android RecyclerView Tutorial: bit.ly/2TqVjPz
👉 Android Room Tutorial: bit.ly/2PfQHeN
👉 Firebase Auth Tutorial: bit.ly/2WUGhEo
👉 Android Notification Tutorial: bit.ly/2Sc6jQl
👉 Building a Complete Wallpaper App: bit.ly/30UN8zV
👉 Build Tic Tac Toe in Android: bit.ly/30goxW0
❤️❤️ Thank You All for the Love and Support ❤️❤️
#KotlinOOP
#OOPsConcept
#LearnKotlin - Наука та технологія
At 4:52 I accidentally said that "to the constructor we will pass", but the observable is a function and not a class. So here we are passing the initial value to the function as a parameter. Sorry for this.
Llll
L
L
thank you very much! super simply explained!
Thank you a lot! Really cool lessons!
Loved it!
amazing tutorial !!!!
Useful topics which used while day today coding. 👍
Glad to hear that!
Thanks!!!
Thanks alot.
Great work.....
Nice class
That was really good! MTBA
These are awesome do you videos explaining all about lamdas. It's hard to understand :(
If incase anyone is using some other editor like VSCode, vim etc , do add the import => import kotlin.properties.Delegates.
what is the datatype/classtype of heavy. dont we have to specify a classname when lazy loaded like
val heavy:Classname by lazy ......
we can observe the changes by defining normal setter also, then what is the use of Delegate.observable ??
Functionality wise both are same but delegates may be better in cases where you are having the same functionality for multiple variables.
With setters you need to write duplicate code
but
You can assign the deligate to a variable and then use the same variable as the delegates. This will reduce your code repetition.
@@SimplifiedCoding Okay 👍
Hai bro, why video quality is only 320p what happened?
UA-cam takes some time to process HD videos, after some time it will become Full HD.
@@SimplifiedCoding i seen in 1440p60 thankyou so much sir for all your helpfull videos
vetoable vs setter? set(value) { field = value } also does the same thing i guess
I guess vetoable is like set(value) { if(condition) field = value }
Woow woow 😍💋 💝💖❤️