public abstract class AbstractStateContext extends java.lang.Object implements StateContext
StateContext
which uses a Map
to store the
attributes.构造器和说明 |
---|
AbstractStateContext() |
限定符和类型 | 方法和说明 |
---|---|
java.lang.Object |
getAttribute(java.lang.Object key)
Returns the value of the attribute with the specified key or
null if not found. |
protected java.util.Map<java.lang.Object,java.lang.Object> |
getAttributes() |
State |
getCurrentState() |
void |
setAttribute(java.lang.Object key,
java.lang.Object value)
Sets the value of the attribute with the specified key.
|
void |
setCurrentState(State state)
Sets the current
State . |
java.lang.String |
toString() |
public java.lang.Object getAttribute(java.lang.Object key)
StateContext
null
if not found.getAttribute
在接口中 StateContext
key
- the key.null
.public State getCurrentState()
getCurrentState
在接口中 StateContext
State
. This is only meant for internal use.public void setAttribute(java.lang.Object key, java.lang.Object value)
StateContext
setAttribute
在接口中 StateContext
key
- the key.value
- the value.public void setCurrentState(State state)
StateContext
State
. This is only meant for internal use.
Don't call it directly!setCurrentState
在接口中 StateContext
state
- the new current State
.protected java.util.Map<java.lang.Object,java.lang.Object> getAttributes()
public java.lang.String toString()
toString
在类中 java.lang.Object