net.dpml.state
Class DefaultTransition

java.lang.Object
  extended bynet.dpml.state.DefaultTransition
All Implemented Interfaces:
Action, Serializable, Transition

public class DefaultTransition
extends Object
implements Transition, Serializable

Default implemention of a state transition descriptor.

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

Constructor Summary
DefaultTransition(String name, String target)
          Creation of a new transition.
DefaultTransition(String name, String target, Operation operation)
          Creation of a new transition.
 
Method Summary
 boolean equals(Object other)
          Compare this object to another for equality.
 String getName()
          Return the transition name
 Operation getOperation()
          Return an operation associated with the transition.
 State getState()
          Return the state that this transition is a part of.
 String getTargetName()
          Return the transition target state name
 int hashCode()
          Compute the hashcode for this instance.
 void setState(State state)
          Set the state that this transition is a part of.
 String toString()
          Return a string representation of the instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultTransition

public DefaultTransition(String name,
                         String target)
Creation of a new transition.

Parameters:
name - the transition name
target - the transit target state name

DefaultTransition

public DefaultTransition(String name,
                         String target,
                         Operation operation)
Creation of a new transition.

Parameters:
name - the transition name
target - the transit target state name
operation - optional transition operation
Method Detail

setState

public void setState(State state)
Set the state that this transition is a part of.

Specified by:
setState in interface Transition
Parameters:
state - the owning state

getState

public State getState()
Return the state that this transition is a part of.

Specified by:
getState in interface Transition
Returns:
the owning state

getName

public String getName()
Return the transition name

Specified by:
getName in interface Action
Returns:
the name

getTargetName

public String getTargetName()
Return the transition target state name

Specified by:
getTargetName in interface Transition
Returns:
the target state name

getOperation

public Operation getOperation()
Return an operation associated with the transition.

Specified by:
getOperation in interface Transition
Returns:
a possibly null operation

equals

public boolean equals(Object other)
Compare this object to another for equality.

Parameters:
other - the other object
Returns:
true if the object is equal to this object

hashCode

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

Returns:
the hashcode value

toString

public String toString()
Return a string representation of the instance.

Returns:
the string value