Package fr.uga.pddl4j.problem.operator
Class Effect
java.lang.Object
fr.uga.pddl4j.problem.operator.AbstractFluentDescription
fr.uga.pddl4j.problem.operator.Effect
- All Implemented Interfaces:
FluentDescription
,Serializable
This class implements the effect of the actions.
- Since:
- 4.0
- See Also:
FluentDescription
,NumericAssignment
, Serialized Form
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNumericAssignment(NumericAssignment assignment)
Adds a numeric assignment to the effect.boolean
Return if a specified object is equals to this effect.Returns the numeric assignments of the effect.int
hashCode()
Returns the hash code value of this effect.void
setNumericAssignments(Set<NumericAssignment> assignments)
Sets the numeric assignments of the effect.toString()
Returns a string representation of this effect.Methods inherited from class fr.uga.pddl4j.problem.operator.AbstractFluentDescription
cardinality, getNegativeFluents, getPositiveFluents, isConsistent, isEmpty
-
Constructor Details
-
Effect
public Effect()Creates new effect. By default the effect has no positive and no negative fluents. -
Effect
Creates new effect from an other one. This constructor create a deep copy of the object in parameter.- Parameters:
other
- the other one.
-
Effect
Creates new effect from a specified positive and negative timed fluent description and an empty set of numeric assignments.- Parameters:
positive
- the positive bit vetcor of this effect.negative
- the negative bit vetcor of the effect.
-
-
Method Details
-
getNumericAssignments
Returns the numeric assignments of the effect.- Returns:
- the numeric assignments of the effect.
-
setNumericAssignments
Sets the numeric assignments of the effect.- Parameters:
assignments
- the numeric assignments of the effect.
-
addNumericAssignment
Adds a numeric assignment to the effect.- Parameters:
assignment
- the numeric assignment to add.
-
hashCode
public int hashCode()Returns the hash code value of this effect.- Overrides:
hashCode
in classObject
- Returns:
- the hash code value of this effect.
- See Also:
Object.hashCode()
-
equals
Return if a specified object is equals to this effect. The specified object is equal to the effect if and only if the object is an instance of the classEffect
and it has the same positive and negative timed fluent description and the same numeric assignments.- Overrides:
equals
in classObject
- Parameters:
object
- the specified object to compared.- Returns:
true
if the specified object is equal to the precondition;false
otherwise.- See Also:
Object.equals(java.lang.Object)
-
toString
Returns a string representation of this effect.
-