class SharedValues


Shared values

Summary

Nested types

interface for listeners

Constants

const Int
UNSET = -1

Public constructors

Public functions

Unit

Add a listener for a key

Unit

remove all listeners

Unit
fireNewValue(key: Int, value: Int)

notify that value has changed

Int
getValue(key: Int)

get the value from the map

Unit

Remove a listener

Unit

Remove listener for a key (will not be removed for other keys)

Constants

UNSET

Added in 2.2.0
const val UNSET = -1: Int

Public constructors

SharedValues

Added in 2.2.0
SharedValues()

Public functions

addListener

Added in 2.2.0
fun addListener(key: Int, listener: SharedValues.SharedValuesListener!): Unit

Add a listener for a key

Parameters
key: Int
listener: SharedValues.SharedValuesListener!

clearListeners

Added in 2.2.0
fun clearListeners(): Unit

remove all listeners

fireNewValue

Added in 2.2.0
fun fireNewValue(key: Int, value: Int): Unit

notify that value has changed

Parameters
key: Int
value: Int

getValue

Added in 2.2.0
fun getValue(key: Int): Int

get the value from the map

Parameters
key: Int
Returns
Int

removeListener

Added in 2.2.0
fun removeListener(listener: SharedValues.SharedValuesListener!): Unit

Remove a listener

Parameters
listener: SharedValues.SharedValuesListener!

removeListener

Added in 2.2.0
fun removeListener(key: Int, listener: SharedValues.SharedValuesListener!): Unit

Remove listener for a key (will not be removed for other keys)

Parameters
key: Int
listener: SharedValues.SharedValuesListener!