hkontrol.core
Class ImmutableState

java.lang.Object
  extended by hkontrol.core.ImmutableState

public class ImmutableState
extends java.lang.Object

This small wrapper class provides immutable access to a State object. Its main use is to give actions a method to know the state in which they are executed without being able to modify it.


Constructor Summary
ImmutableState(State state)
          The only constructor expects a State object that can be accessed via ImmutableState.
 
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.
 java.lang.String toString()
          returns the represented state as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImmutableState

public ImmutableState(State state)
The only constructor expects a State object that can be accessed via ImmutableState.

Parameters:
state -
Method Detail

getProperty

public java.lang.String getProperty(java.lang.String key)
returns the current value of a given property or null if no such property was set.

Parameters:
key - the key of the requested property
Returns:
the current value of the named property or null if no such property was set.

toString

public java.lang.String toString()
returns the represented state as a string.

Overrides:
toString in class java.lang.Object
Returns:
the state as a string.