net.openai.util.fsm
Class BooleanCondition

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

public final class BooleanCondition
extends AbstractCondition

BooleanCondition class

See Also:
Serialized Form

Constructor Summary
BooleanCondition()
          Constructs a BooleanCondition with it's target value set to true.
BooleanCondition(boolean target)
          Constructs a BooleanCondition with the given target value.
BooleanCondition(java.lang.Boolean target)
          Constructs a BooleanCondition with the given target value.
BooleanCondition(State targetState)
          Constructs a BooleanCondtion with it's target value set to true and it's target state set to the given state.
BooleanCondition(State targetState, boolean target)
          Constructs a BooleanCondition with the given target value and the given target state.
BooleanCondition(State targetState, java.lang.Boolean target)
          Constructs a BooleanCondition with the given target value.
 
Method Summary
 boolean getTarget()
          Returns the target value that will satisfy this condition.
 boolean satisfiedBy(java.lang.Object conditional)
          Called to check if the conditional meets the criteria defined by this state.
 void setTarget(boolean target)
          Sets the target boolean value that will satisfy this condition.
 void setTarget(java.lang.Boolean target)
          Sets the target Boolean value that will satisfy this 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

BooleanCondition

public BooleanCondition()
Constructs a BooleanCondition with it's target value set to true.


BooleanCondition

public BooleanCondition(boolean target)
Constructs a BooleanCondition with the given target value.

Parameters:
target - The boolean value that will satisfy this condition.

BooleanCondition

public BooleanCondition(java.lang.Boolean target)
Constructs a BooleanCondition with the given target value.

Parameters:
target - The Boolean value that will satisfy this condition.

BooleanCondition

public BooleanCondition(State targetState)
Constructs a BooleanCondtion with it's target value set to true and it's target state set to the given state.

Parameters:
targetState - The target state for this BooleanCondition.

BooleanCondition

public BooleanCondition(State targetState,
                        boolean target)
Constructs a BooleanCondition with the given target value and the given target state.

Parameters:
targetState - The target state for this BooleanCondtion.
target - The boolean value that will satisfy this condition.

BooleanCondition

public BooleanCondition(State targetState,
                        java.lang.Boolean target)
Constructs a BooleanCondition with the given target value.

Parameters:
targetState - The target state for this BooleanCondition.
target - The Boolean value that will satisfy this condition.
Method Detail

setTarget

public final void setTarget(boolean target)
Sets the target boolean value that will satisfy this condition.

Parameters:
target - The boolean value that will satisfy this condition.

setTarget

public final void setTarget(java.lang.Boolean target)
Sets the target Boolean value that will satisfy this condition.

Parameters:
target - The Boolean value that will satisfy this condition.

getTarget

public final boolean getTarget()
Returns the target value that will satisfy this condition.

Returns:
The target value that will satisfy this condition.

satisfiedBy

public final boolean satisfiedBy(java.lang.Object conditional)
Called to check if the conditional meets the criteria defined by this state. This is the only method to implement in order to used this interface.

Parameters:
conditional - The object to check.
Returns:
Implementors should return true if this condition is met by the Object conditional and false otherwise.