|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.barracudamvc.plankton.data.DefaultStateMap
public class DefaultStateMap
A StateMap is an object that is capable of carrying state information along with it--you can put properties into the state and then get them back out.
This class provides the default implementation of a StateMap. The underlying storage structure is a HashMap, so it a) isn't threadsafe and b) accepts nulls. If you need more than the minimal functionality exposed in the StateMap interface, you should work with the underlying Map structure.
Key entities that implement StateMap:
Field Summary | |
---|---|
protected static org.apache.log4j.Logger |
logger
|
protected Map |
props
|
Constructor Summary | |
---|---|
DefaultStateMap()
|
Method Summary | |
---|---|
void |
clearState()
clear all state information |
Object |
getState(Object key)
get a property in this StateMap |
Set |
getStateKeys()
get a keyset for this StateMap (whether or not the set is backed by the data store depends on the implementation). |
Map |
getStateStore()
get a Map that holds the state values (whether or not the Map is backed by the data store depends on the implementation). |
void |
putState(Object key,
Object val)
set a property in this StateMap |
Object |
removeState(Object key)
remove a property in this StateMap. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger logger
protected Map props
Constructor Detail |
---|
public DefaultStateMap()
Method Detail |
---|
public void putState(Object key, Object val)
putState
in interface StateMap
key
- the key objectval
- the value objectpublic Object getState(Object key)
getState
in interface StateMap
key
- the key object
public Object removeState(Object key)
removeState
in interface StateMap
key
- the key object
public Set getStateKeys()
getStateKeys
in interface StateMap
public Map getStateStore()
getStateStore
in interface StateMap
public void clearState()
clearState
in interface StateMap
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |