public class SharedValues


Shared values

Summary

Nested types

interface for listeners

Constants

static final int
UNSET = -1

Public constructors

Public methods

void

Add a listener for a key

void

remove all listeners

void
fireNewValue(int key, int value)

notify that value has changed

int
getValue(int key)

get the value from the map

void

Remove a listener

void

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

Constants

UNSET

Added in 2.2.0
public static final int UNSET = -1

Public constructors

SharedValues

Added in 2.2.0
public SharedValues()

Public methods

addListener

Added in 2.2.0
public void addListener(int key, SharedValues.SharedValuesListener listener)

Add a listener for a key

Parameters
int key
SharedValues.SharedValuesListener listener

clearListeners

Added in 2.2.0
public void clearListeners()

remove all listeners

fireNewValue

Added in 2.2.0
public void fireNewValue(int key, int value)

notify that value has changed

Parameters
int key
int value

getValue

Added in 2.2.0
public int getValue(int key)

get the value from the map

Parameters
int key
Returns
int

removeListener

Added in 2.2.0
public void removeListener(SharedValues.SharedValuesListener listener)

Remove a listener

Parameters
SharedValues.SharedValuesListener listener

removeListener

Added in 2.2.0
public void removeListener(int key, SharedValues.SharedValuesListener listener)

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

Parameters
int key
SharedValues.SharedValuesListener listener