Package fr.uga.pddl4j.problem
Class State
java.lang.Object
fr.uga.pddl4j.util.BitSet
fr.uga.pddl4j.util.BitVector
fr.uga.pddl4j.problem.State
- All Implemented Interfaces:
Serializable
,Cloneable
This class implements a logical state.
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply(ConditionalEffect effects)
Applies a conditional effects to this state.void
Applies a specified state to this state.void
apply(List<ConditionalEffect> effects)
Applies a list of conditional effects to this state.boolean
Returnstrue
if this state satisfy a specified expression.Methods inherited from class fr.uga.pddl4j.util.BitVector
exclude, getIntersection, include, shiftLeft, shiftRight
Methods inherited from class fr.uga.pddl4j.util.BitSet
and, andNot, cardinality, clear, clear, clear, clone, ensureCapacity, equals, flip, flip, get, get, hashCode, intersects, isEmpty, length, nextClearBit, nextSetBit, or, previousClearBit, previousSetBit, recalculateWordsInUse, set, set, set, set, size, stream, toByteArray, toLongArray, toString, valueOf, valueOf, valueOf, valueOf, xor
-
Constructor Details
-
State
public State()Creates a new state. -
State
Creates a new state from a specified state.- Parameters:
state
- the state.
-
State
Creates a new state from a specified initial state.- Parameters:
state
- the 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
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
Applies a list of conditional effects to this state.- Parameters:
effects
- the list of conditional effects to apply.
-
apply
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
Returnstrue
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.
-