|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
hkontrol.core.State
public class State
This class is the very core of HKontrol's MVC implementation. It merely
implements a restricted, observable map. Module have to use this class to
announce their runtime obtained status information while Rule
objects constitue appropriate actions to execute.
| Constructor Summary | |
|---|---|
State()
initializes the State object. |
|
| Method Summary | |
|---|---|
java.lang.String |
getProperty(java.lang.String key)
returns the current value of a given property or null if no such property was set. |
boolean |
setProperties(java.util.Map properties)
sets a number of properties at once. |
boolean |
setProperty(java.lang.String key,
boolean value)
sets a single property and notifies the state observers if the state actually changed. |
boolean |
setProperty(java.lang.String key,
long value)
sets a single property and notifies the state observers if the state actually changed. |
boolean |
setProperty(java.lang.String key,
java.lang.String value)
sets a single property and notifies the state observers if the state actually changed. |
java.lang.String |
toString()
returns a string describing the contents of the state object. |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public State()
State object.
| Method Detail |
|---|
public boolean setProperties(java.util.Map properties)
String objects as keys and values. The state observers are
being notified only once and only if the state actually changed.
properties - a map containing keys value pairs describing a current module
state.
true if any property has been changed,
false otherwise.
public boolean setProperty(java.lang.String key,
long value)
key - the key of the property to changevalue - the property's new value that will be converted to a
String object
true if any property has been changed,
false otherwise.
public boolean setProperty(java.lang.String key,
boolean value)
key - the key of the property to changevalue - the property's new value that will be converted to a
String object
true if any property has been changed,
false otherwise.
public boolean setProperty(java.lang.String key,
java.lang.String value)
key - the key of the property to changevalue - the property's new value that will be converted to a
String object
true if any property has been changed,
false otherwise.public java.lang.String getProperty(java.lang.String key)
key - the key of the requested property
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||