Kotlin Delegates Check

Kotlin languages likes to work with lazy property initialization.
Methods that will be implemented in proper time.
Usual usage is something like this:
lateinit var loginButton: LoginButton
or like this: Defer the cost of initialization until they’re actually needed.
val tvOutput by lazy { findViewById<TextView>(R.id.textViewOutput) }
But we can also use a built-in delegate.
Delegate object is a reference type variable that use holds reference to a method.
Delegate Vetoable
Functional interface of lambda passed to the vetoable is called before the assignment of a new value to property. Returning false from the lambda allows you to “veto” the assignment, so we apply sanctions and default value will be returned. Otherwise, True means the positive scenario.
So, it very simple to use anyway
Delegate Observable
Each time value changes it calls the delegate to perform some action and assign a new value.
Conclusion
It is nice mechanism to set new value or make check in functional “Lambda” way.