net.openai.util.fsm
Class EqualsCondition

java.lang.Object
  |
  +--net.openai.util.fsm.Condition
        |
        +--net.openai.util.fsm.EqualsCondition
All Implemented Interfaces:
java.io.Serializable

public final class EqualsCondition
extends Condition

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 targetCondition)
          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
 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.
 
Methods inherited from class net.openai.util.fsm.Condition
getSourceStates, 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 targetCondition)
Constructs a new EqualsCondtion with the given target state.


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

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

Specified by:
satisfiedBy in class Condition
Parameters:
conditional - The object to check.
Returns:
True if conditional == target, false otherwise.


Copyright - 2001 OpenAI Labs. All Rights Reserved.