public class StructuralStateHelper extends java.lang.Object implements Stateful
StateOperator
.Constructor and Description |
---|
StructuralStateHelper(Structural structural,
StateOperator operator)
Create a new instance that will track state changes in the children
of the given
Structural . |
Modifier and Type | Method and Description |
---|---|
void |
addStateListener(StateListener listener)
Add a job state listener.
|
StateEvent[] |
getChildStates() |
StateOperator |
getStateOperator() |
StateEvent |
lastStateEvent()
Get the last state event.
|
void |
removeStateListener(StateListener listener)
Remove a job state listener.
|
void |
setStateOperator(StateOperator stateOperator)
Change the State Operator to be used to combine child state.
|
public StructuralStateHelper(Structural structural, StateOperator operator)
Structural
. States of the children will be
combined using the given StateOperator
.structural
- The structural. Must not be null.operator
- The operator that combines child state. Must not be
null.public void addStateListener(StateListener listener)
Stateful
addStateListener
in interface Stateful
listener
- The listener.public void removeStateListener(StateListener listener)
Stateful
removeStateListener
in interface Stateful
listener
- The listener.public StateEvent lastStateEvent()
Stateful
lastStateEvent
in interface Stateful
public StateEvent[] getChildStates()
public StateOperator getStateOperator()
public void setStateOperator(StateOperator stateOperator)
stateOperator
- The State Operator. Must not be null.