Package fr.uga.pddl4j.problem.operator
Class ConditionalEffect
java.lang.Object
fr.uga.pddl4j.problem.operator.ConditionalEffect
- All Implemented Interfaces:
Serializable
This class allows to implements the conditional effects of an action.
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorDescriptionCreates a new empty conditional effect.ConditionalEffect(ConditionalEffect other)
Creates a conditional effect from an other.ConditionalEffect(Condition conditions, Effect effects)
Creates a new conditional effect with some specified conditions and effects.ConditionalEffect(Effect effects)
Creates a new conditional effect with some specified effects. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if a specified object is equal to this conditional expression.Returns the conditions of the conditional effect.Returns the effects of the conditional effect.int
hashCode()
Returns the hash code of this conditional effect.void
setCondition(Condition conditions)
Sets the conditions of the conditional effect.void
Sets the effects of the conditional effect.
-
Constructor Details
-
ConditionalEffect
Creates a conditional effect from an other. This constructor is the copy constructor.- Parameters:
other
- the other conditional bit expression.
-
ConditionalEffect
public ConditionalEffect()Creates a new empty conditional effect. -
ConditionalEffect
Creates a new conditional effect with some specified effects.- Parameters:
effects
- the effects.
-
ConditionalEffect
Creates a new conditional effect with some specified conditions and effects.- Parameters:
conditions
- the conditions.effects
- the effects.
-
-
Method Details
-
getCondition
Returns the conditions of the conditional effect.- Returns:
- the conditions of the conditional effect.
-
setCondition
Sets the conditions of the conditional effect.- Parameters:
conditions
- the conditions to set.
-
getEffect
Returns the effects of the conditional effect.- Returns:
- the effects of the conditional effect.
-
setEffect
Sets the effects of the conditional effect.- Parameters:
effects
- the effects to set
-
hashCode
public int hashCode()Returns the hash code of this conditional effect.- Overrides:
hashCode
in classObject
- Returns:
- the hash code of this conditional effect.
- See Also:
Object.hashCode()
-
equals
Returnstrue
if a specified object is equal to this conditional expression. In other words, returnstrue
if the specified object is an instance of the same type as this instance, all of whose members (conditions and effects) are equal to the corresponding member of this conditional expression.- Overrides:
equals
in classObject
- Parameters:
obj
- the reference object with which to compare.- Returns:
true
if a specified object is equal to this conditional expression;false
.- See Also:
Object.equals(java.lang.Object)
-