Package fr.uga.pddl4j.problem.operator
Class AbstractOperator
java.lang.Object
fr.uga.pddl4j.problem.operator.AbstractInstantiatedOperator
fr.uga.pddl4j.problem.operator.AbstractOperator
- All Implemented Interfaces:
Operator
,Serializable
This abstract class implements the common part of an operator (action of method) with bitset representation.
- See Also:
- Serialized Form
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractOperator(AbstractOperator other)
Creates a new operator from another.protected
AbstractOperator(String name, int arity)
Creates a new operator.protected
AbstractOperator(String name, int[] parameters, int[] instantiations, Condition preconditions)
Creates a new operator. -
Method Summary
Modifier and TypeMethodDescriptionReturn the precondition of the operator.void
setPrecondition(Condition precondition)
Set the precondition of the operator.Methods inherited from class fr.uga.pddl4j.problem.operator.AbstractInstantiatedOperator
arity, equals, getInstantiations, getName, getParameters, getTypeOfParameters, getValueOfParameter, hashCode, isAlreadyInstantiatedWith, isDummy, setDummy, setName, setTypeOfParameter, setValueOfParameter
-
Constructor Details
-
AbstractOperator
Creates a new operator from another.- Parameters:
other
- the other operator.
-
AbstractOperator
Creates a new operator.- Parameters:
name
- the name of the operator.arity
- the arity of the operator.
-
AbstractOperator
protected AbstractOperator(String name, int[] parameters, int[] instantiations, Condition preconditions)Creates a new operator. The length of the parameters and the length of instantiations must be the same.- Parameters:
name
- the name of the operator.parameters
- the types of the parameters.instantiations
- the values of the parameters.preconditions
- the precondition of the operator.
-
-
Method Details
-
getPrecondition
Return the precondition of the operator.- Returns:
- the precondition of the operator.
-
setPrecondition
Set the precondition of the operator.- Parameters:
precondition
- the precondition to set.
-