Package fr.uga.pddl4j.parser
Class ParsedDerivedPredicate
java.lang.Object
fr.uga.pddl4j.parser.AbstractParsedObject
fr.uga.pddl4j.parser.ParsedDerivedPredicate
- All Implemented Interfaces:
ParsedObject
,Serializable
This class implements a derived predicate of the PDDL 3.0 language.
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from interface fr.uga.pddl4j.parser.ParsedObject
DEFAULT_BEGIN_LINE, DEFAULT_BEGING_COLUMN, DEFAULT_END_COLUMN, DEFAULT_END_LINE
-
Constructor Summary
ConstructorDescriptionParsedDerivedPredicate(NamedTypedList head, Expression<String> body)
Creates a new derived predicate with a specific head and body. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns if this derived predicate is equal to another object.getBody()
Returns the body of the derived predicate.getHead()
Returns the head of the derived predicate.int
hashCode()
Returns the hash code value of the derived predicate.void
setBody(Expression<String> body)
Sets the body of this derived predicate.void
setHead(NamedTypedList head)
Sets the head of the derived predicate.toString()
Returns a string representation of this derived predicate.Methods inherited from class fr.uga.pddl4j.parser.AbstractParsedObject
getBeginColumn, getBeginLine, getEndColumn, getEndLine, setBegin, setBeginColumn, setBeginLine, setEnd, setEndColumn, setEndLine
-
Constructor Details
-
ParsedDerivedPredicate
Creates a new derived predicate with a specific head and body.- Parameters:
head
- the head of the derived predicate.body
- the body of the derived predicate.
-
-
Method Details
-
getHead
Returns the head of the derived predicate.- Returns:
- the head of the derived predicate.
-
setHead
Sets the head of the derived predicate.- Parameters:
head
- the head to set.
-
getBody
Returns the body of the derived predicate.- Returns:
- the body of the derived predicate.
-
setBody
Sets the body of this derived predicate.- Parameters:
body
- the body to set.
-
equals
Returns if this derived predicate is equal to another object.- Overrides:
equals
in classObject
- Parameters:
obj
- the other object.- Returns:
true
ifobj
is notnull
, is an instance of the classParsedDerivedPredicate
and has the same head and body; otherwise it returnsfalse
.- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()Returns the hash code value of the derived predicate.- Overrides:
hashCode
in classObject
- Returns:
- the hash code value of the derived predicate.
- See Also:
Object.hashCode()
-
toString
Returns a string representation of this derived predicate.- Overrides:
toString
in classObject
- Returns:
- a string representation of this derived predicate.
- See Also:
Object.toString()
-