Class AbstractIntOperator

java.lang.Object
fr.uga.pddl4j.problem.operator.AbstractInstantiatedOperator
fr.uga.pddl4j.problem.operator.AbstractIntOperator
All Implemented Interfaces:
Operator, Serializable
Direct Known Subclasses:
IntAction, IntMethod

public abstract class AbstractIntOperator extends AbstractInstantiatedOperator
This abstract class implements the common part of an operator (action of method) with integer representation.
See Also:
Serialized Form
  • Constructor Details

    • AbstractIntOperator

      protected AbstractIntOperator(AbstractIntOperator other)
      Creates a new operator from another.
      Parameters:
      other - the other operator.
    • AbstractIntOperator

      protected AbstractIntOperator(String name, int arity)
      Creates a new operator with. The precondition is initialized with OR expression.
      Parameters:
      name - the name of the operator.
      arity - the arity of the operator.
    • AbstractIntOperator

      protected AbstractIntOperator(String name, int[] parameters, int[] instantiations, Expression<Integer> 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 preconditions of the operator.
  • Method Details

    • getPreconditions

      public final Expression<Integer> getPreconditions()
      Return the preconditions of the operator.
      Returns:
      the preconditions of the operator.
    • setPreconditions

      public final void setPreconditions(Expression<Integer> preconditions)
      Set the precondition of the operator.
      Parameters:
      preconditions - the preconditions to set.
    • isDurative

      public final boolean isDurative()
      Returns if this action is a durative action.
      Returns:
      true if this action is durative; false otherwise.
    • getDuration

      public final Expression<Integer> getDuration()
      Returns the duration of the action.
      Returns:
      the duration of the action.
    • setDuration

      public final void setDuration(Expression<Integer> duration)
      Sets the duration of the action.
      Parameters:
      duration - the duration to set.