Class State

All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
Node, Node

public class State extends BitVector
This class implements a logical state.
See Also:
Serialized Form
  • Constructor Details

    • State

      public State()
      Creates a new state.
    • State

      public State(Condition state)
      Creates a new state from a specified state.
      Parameters:
      state - the state.
    • State

      public State(InitialState state)
      Creates a new state from a specified initial state.
      Parameters:
      state - the state.
    • State

      public State(State state)
      Creates a new state from an other state. This constructor is the copy constructor.
      Parameters:
      state - the other state to copy.
  • Method Details

    • apply

      public final void apply(Effect state)
      Applies a specified state to this state. In other word, the positive facts of the specified state are added to this state and the negative ones are delete.
      Parameters:
      state - the state to apply.
    • apply

      public final void apply(List<ConditionalEffect> effects)
      Applies a list of conditional effects to this state.
      Parameters:
      effects - the list of conditional effects to apply.
    • apply

      public final void apply(ConditionalEffect effects)
      Applies a conditional effects to this state. In other word, the positive fluent of the specified effects are added to this state and the negative ones are delete. The state is modified if and only if the condition of the conditional effects hold in the state, otherwise the state stay unchanged.
      Parameters:
      effects - the expression to apply.
    • satisfy

      public final boolean satisfy(Condition state)
      Returns true if this state satisfy a specified expression.
      Parameters:
      state - the state to be tested.
      Returns:
      true if this state satisfy a specified state; false otherwise.