net.openai.util.fsm
Class AnyCondition

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

public final class AnyCondition
extends AbstractCondition

This condition will be satisfield by any condition that is passed in. It is designed to be a "catch all" condition - usually put at the end of the list of conditions on the state or perhaps the only condition for a given transition from one state to another.

See Also:
Serialized Form

Constructor Summary
AnyCondition()
          Constructs an AnyCondition instance.
AnyCondition(State targetState)
          Constructs an AnyCondition with the target state.
 
Method Summary
 boolean satisfiedBy(java.lang.Object conditional)
          Called to check if the conditional meets the criteria defined by this state.
 
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

AnyCondition

public AnyCondition()
Constructs an AnyCondition instance.


AnyCondition

public AnyCondition(State targetState)
Constructs an AnyCondition with the target state.

Parameters:
targetState - The target state for this AnyCondition.
Method Detail

satisfiedBy

public final boolean satisfiedBy(java.lang.Object conditional)
Called to check if the conditional meets the criteria defined by this state. In this case, any condition will meet this criteria.

Parameters:
conditional - The object to check.
Returns:
Always true.