Package fr.uga.pddl4j.parser
Interface ParsedOperator
- All Superinterfaces:
ParsedObject
,Serializable
- All Known Implementing Classes:
ParsedAbstractOperator
,ParsedAction
,ParsedMethod
This interface defines the methods of all planning operators.
-
Field Summary
Fields inherited from interface fr.uga.pddl4j.parser.ParsedObject
DEFAULT_BEGIN_LINE, DEFAULT_BEGING_COLUMN, DEFAULT_END_COLUMN, DEFAULT_END_LINE
-
Method Summary
Modifier and TypeMethodDescriptionint
getArity()
Return the arity of the operator, i.e., the number of parameters of the operator.Returns the duration constraints of the operator.getName()
Returns the name of the operator.getParameter(Symbol<String> symbol)
Returns the parameter of the operator that has a specified symbol.Returns the list of parameters of the operator.Returns the goal description that represents the preconditions of the operator.boolean
Returns if this action is durative operator.void
setDuration(Expression<String> duration)
Sets new duration constraints to the operator.void
Sets a new name to the operator.void
setParameters(List<TypedSymbol<String>> parameters)
Sets a new list of parameters to this operator.void
setPreconditions(Expression<String> preconditions)
Sets new preconditions to the operator.toTask()
Returns the task representation of this operator.Methods inherited from interface fr.uga.pddl4j.parser.ParsedObject
getBeginColumn, getBeginLine, getEndColumn, getEndLine, setBegin, setBeginColumn, setBeginLine, setEnd, setEndColumn, setEndLine
-
Method Details
-
getName
Returns the name of the operator.- Returns:
- the name of the operator.
-
setName
Sets a new name to the operator.- Parameters:
name
- the name to set.
-
getParameters
List<TypedSymbol<String>> getParameters()Returns the list of parameters of the operator.- Returns:
- the list of parameters of the operator.
-
getParameter
Returns the parameter of the operator that has a specified symbol.- Parameters:
symbol
- The symbol.- Returns:
- the parameter of the operator that has a specified symbol or
null
if the operator has no such parameter.
-
toTask
NamedTypedList toTask()Returns the task representation of this operator.- Returns:
- the task representation of this operator.
-
setParameters
Sets a new list of parameters to this operator.- Parameters:
parameters
- The list of parameters to set.
-
getPreconditions
Expression<String> getPreconditions()Returns the goal description that represents the preconditions of the operator.- Returns:
- The goal description that represents the preconditions of the operator.
-
setPreconditions
Sets new preconditions to the operator.- Parameters:
preconditions
- The new goal description that represents the preconditions of the operator to set.
-
getArity
int getArity()Return the arity of the operator, i.e., the number of parameters of the operator.- Returns:
- the arity of the operator.
-
getDuration
Expression<String> getDuration()Returns the duration constraints of the operator. If the return value is null, it means that that the operator is not durative.- Returns:
- the duration constraints of the operator.
-
setDuration
Sets new duration constraints to the operator.- Parameters:
duration
- the duration constraint to set
-
isDurative
boolean isDurative()Returns if this action is durative operator. If the method returnfalse
, the accessorgetDuration()
returnsfalse
.- Returns:
true
if this operator is a durative,false
otherwise.
-