net.openai.util.fsm
Class EqualsCondition

java.lang.Object
  extended by net.openai.util.fsm.AbstractCondition
      extended by net.openai.util.fsm.EqualsCondition
All Implemented Interfaces:
java.io.Serializable, Condition

public final class EqualsCondition
extends AbstractCondition

EqualsCondition class

See Also:
Serialized Form

Constructor Summary
EqualsCondition()
          Constructs a new EqualsCondition.
EqualsCondition(java.lang.Object target)
          Constructs a new EqualsCondition with the target target.
EqualsCondition(State targetState)
          Constructs a new EqualsCondtion with the given target state.
EqualsCondition(State targetState, java.lang.Object target)
          Constructs a new EqualsCondition with the target target and the given target state.
 
Method Summary
 java.lang.Object getTarget()
          Returns the target of this equals condition.
 boolean satisfiedBy(java.lang.Object conditional)
          Implemented method for the Condition interface Called to check if the condition meets the criteria defined by this state.
 void setTarget(java.lang.Object target)
          Sets the target of this equals condition.
 
Methods inherited from class net.openai.util.fsm.AbstractCondition
getTargetState, setTargetState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EqualsCondition

public EqualsCondition()
Constructs a new EqualsCondition.


EqualsCondition

public EqualsCondition(State targetState)
Constructs a new EqualsCondtion with the given target state.

Parameters:
targetState - The target state of this condition.

EqualsCondition

public EqualsCondition(java.lang.Object target)
Constructs a new EqualsCondition with the target target. The satisfiedBy method will return true if the passed in object is equal to (== operator) the target object.

Parameters:
target - The target of this equals condition.

EqualsCondition

public EqualsCondition(State targetState,
                       java.lang.Object target)
Constructs a new EqualsCondition with the target target and the given target state. The satisfiedBy method will return true if the passed in object is equal to (== operator) the target object.

Parameters:
targetState - The target state of this condition.
target - The target of this equals condition.
Method Detail

setTarget

public final void setTarget(java.lang.Object target)
Sets the target of this equals condition.

Parameters:
targe - The target of this equals condition.

getTarget

public final java.lang.Object getTarget()
Returns the target of this equals condition.

Returns:
The target of this equals condition.

satisfiedBy

public final boolean satisfiedBy(java.lang.Object conditional)
Implemented method for the Condition interface Called to check if the condition meets the criteria defined by this state. In this case, the condition is met if: conditional == target

Parameters:
condition - The object to check.
Returns:
True if conditional == target, false otherwise.