Package fr.uga.pddl4j.problem.numeric
Class NumericAssignment
java.lang.Object
fr.uga.pddl4j.problem.numeric.AbstractNumericExpression
fr.uga.pddl4j.problem.numeric.NumericAssignment
- All Implemented Interfaces:
NumericExpression
,Serializable
This class implements a numeric assignment. This class is used to specified numeric assignment in the effect of an
action.
- Since:
- 4.0
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorDescriptionNumericAssignment(AssignmentOperator operator, NumericVariable fluent, ArithmeticExpression expression)
Creates a new numeric assignement with a specified operator, left and right expression.NumericAssignment(NumericAssignment other)
Creates a deep copy of numeric assignment. -
Method Summary
Modifier and TypeMethodDescriptionassign(List<NumericVariable> context)
Returns the value assigned.boolean
Returns if the numeric assignment is equal to an other object.Returns the operator of the numeric assignment.int
hashCode()
Returns the hash code value of this numeric assignment.void
setOperator(AssignmentOperator operator)
Sets the operator of this numeric assignment.toString()
Returns a string representation of this numeric assignment.Methods inherited from class fr.uga.pddl4j.problem.numeric.AbstractNumericExpression
getLeftExpression, getRightExpression, setLeftExpression, setRightExpression
-
Constructor Details
-
NumericAssignment
Creates a deep copy of numeric assignment.- Parameters:
other
- the numeric assignment to be copied.
-
NumericAssignment
public NumericAssignment(AssignmentOperator operator, NumericVariable fluent, ArithmeticExpression expression)Creates a new numeric assignement with a specified operator, left and right expression.- Parameters:
operator
- the operator the numeric assignment.fluent
- the variable of the numeric assignment.expression
- the arithmetic expression of the numeric assignment.
-
-
Method Details
-
setOperator
Sets the operator of this numeric assignment.- Parameters:
operator
- the operator to set.
-
getOperator
Returns the operator of the numeric assignment.- Returns:
- the operator of the numeric assignment.
-
equals
Returns if the numeric assignment is equal to an other object. The object is an instance of the classNumericAssignment
and has the same operator and left and right expressions. -
assign
Returns the value assigned.- Parameters:
context
- the context, i.e., the value of the different variables.- Returns:
- the value assigned.
-
hashCode
public int hashCode()Returns the hash code value of this numeric assignment. -
toString
Returns a string representation of this numeric assignment.
-