net.dpml.state
Class NullState

java.lang.Object
  extended by net.dpml.state.NullState
All Implemented Interfaces:
Serializable, State

public final class NullState
extends Object
implements State, Serializable

Null state implementation.

Version:
1.2.0
Author:
Digital Product Meta Library
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface net.dpml.state.State
NULL_STATE, TYPE
 
Constructor Summary
NullState()
           
 
Method Summary
 boolean equals(Object other)
          Test is this state is equal to the supplied object.
 Interface[] getInterfaces()
          Return the array of operations associated with the state.
 String getName()
          Return the name of the state.
 Operation[] getOperations()
          Return the array of operations associated with the state.
 State getParent()
          Return the parent state to this state or null if this is the root of a state graph.
 State[] getStatePath()
          Return the state path.
 State[] getStates()
          Return the substates within this state.
 Transition[] getTransitions()
          Return the array of transtions associated with the state.
 Trigger[] getTriggers()
          Return the array of triggers associated with the state.
 int hashCode()
          Calcualte the hashcode for this instance.
 boolean isTerminal()
          Test is the state is a terminal state.
 void setParent(State state)
          Set the parent state.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullState

public NullState()
Method Detail

getName

public String getName()
Return the name of the state.

Specified by:
getName in interface State
Returns:
the state name

setParent

public void setParent(State state)
Set the parent state.

Specified by:
setParent in interface State
Parameters:
state - the parent state

getParent

public State getParent()
Return the parent state to this state or null if this is the root of a state graph.

Specified by:
getParent in interface State
Returns:
the parent state

getStatePath

public State[] getStatePath()
Return the state path. The path is composed of a sequence of states from the root to this state.

Specified by:
getStatePath in interface State
Returns:
the state path

getStates

public State[] getStates()
Return the substates within this state.

Specified by:
getStates in interface State
Returns:
the substate array

getTriggers

public Trigger[] getTriggers()
Return the array of triggers associated with the state.

Specified by:
getTriggers in interface State
Returns:
the trigger array

getTransitions

public Transition[] getTransitions()
Return the array of transtions associated with the state.

Specified by:
getTransitions in interface State
Returns:
the transition array

getOperations

public Operation[] getOperations()
Return the array of operations associated with the state.

Specified by:
getOperations in interface State
Returns:
the operation array

getInterfaces

public Interface[] getInterfaces()
Return the array of operations associated with the state.

Specified by:
getInterfaces in interface State
Returns:
the operation array

isTerminal

public boolean isTerminal()
Test is the state is a terminal state.

Specified by:
isTerminal in interface State
Returns:
true if terminal

equals

public boolean equals(Object other)
Test is this state is equal to the supplied object.

Overrides:
equals in class Object
Parameters:
other - the other object
Returns:
true if equal

hashCode

public int hashCode()
Calcualte the hashcode for this instance.

Overrides:
hashCode in class Object
Returns:
the hashcode value