ListenableDelegate.SmartBox default arguments
This commit is contained in:
parent
672f185584
commit
cde5db7a78
@ -4,7 +4,7 @@ kotlin.code.style=official
|
|||||||
specifyKotlinAsDependency=false
|
specifyKotlinAsDependency=false
|
||||||
|
|
||||||
projectGroup=ru.dbotthepony.kommons
|
projectGroup=ru.dbotthepony.kommons
|
||||||
projectVersion=2.9.1
|
projectVersion=2.9.2
|
||||||
|
|
||||||
guavaDepVersion=33.0.0
|
guavaDepVersion=33.0.0
|
||||||
gsonDepVersion=2.8.9
|
gsonDepVersion=2.8.9
|
||||||
|
@ -55,7 +55,7 @@ interface ListenableDelegate<V> : Delegate<V>, Listenable<V> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SmartBox<V>(value: V, private val getter: DelegateGetter<V>, private val setter: DelegateSetter<V>) : ListenableDelegate<V> {
|
class SmartBox<V>(value: V, private val getter: DelegateGetter<V> = DelegateGetter.passthrough(), private val setter: DelegateSetter<V> = DelegateSetter.passthrough()) : ListenableDelegate<V> {
|
||||||
private val value = Box(value)
|
private val value = Box(value)
|
||||||
|
|
||||||
fun clearListeners() {
|
fun clearListeners() {
|
||||||
|
Loading…
Reference in New Issue
Block a user