Forgot to commit this
This commit is contained in:
parent
b0913d1522
commit
a498c8704b
@ -5,7 +5,6 @@ import ru.dbotthepony.kommons.util.Listenable
|
||||
import ru.dbotthepony.kommons.util.ListenableDelegate
|
||||
import java.io.DataInputStream
|
||||
import java.io.DataOutputStream
|
||||
import java.util.*
|
||||
import java.util.function.Consumer
|
||||
|
||||
open class BasicNetworkedElement<TYPE, LEGACY>(private var value: TYPE, protected val codec: StreamCodec<TYPE>, protected val legacyCodec: StreamCodec<LEGACY>, protected val toLegacy: (TYPE) -> LEGACY, protected val fromLegacy: (LEGACY) -> TYPE) : NetworkedElement(), ListenableDelegate<TYPE> {
|
||||
@ -31,6 +30,11 @@ open class BasicNetworkedElement<TYPE, LEGACY>(private var value: TYPE, protecte
|
||||
return valueListeners.addListener(listener)
|
||||
}
|
||||
|
||||
@Deprecated("Internal API")
|
||||
override fun listen(listener: Runnable): Listenable.L {
|
||||
return valueListeners.addListener(listener)
|
||||
}
|
||||
|
||||
override fun get(): TYPE {
|
||||
return value
|
||||
}
|
||||
|
@ -105,6 +105,11 @@ class FloatingNetworkedElement(private var value: Double = 0.0, val ops: Ops, va
|
||||
return valueListeners.addListener(listener)
|
||||
}
|
||||
|
||||
@Deprecated("Internal API")
|
||||
override fun listen(listener: Runnable): Listenable.L {
|
||||
return valueListeners.addListener(listener)
|
||||
}
|
||||
|
||||
override fun get(): Double {
|
||||
return value
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user