August 2017
Intermediate to advanced
440 pages
10h
English
The notNull delegate is the simplest standard library delegate:
var someProperty: SomeType by notNull()
The notNull delegate allows us to define a variable as non-nullable, which is initialized at a later time and not during object construction. We can define a variable as non-nullable without providing a default value. This is an alternative to lateinit:
lateinit var someProperty: ...
Read now
Unlock full access