Class ParsedDerivedPredicate

java.lang.Object
fr.uga.pddl4j.parser.AbstractParsedObject
fr.uga.pddl4j.parser.ParsedDerivedPredicate
All Implemented Interfaces:
ParsedObject, Serializable

public class ParsedDerivedPredicate extends AbstractParsedObject
This class implements a derived predicate of the PDDL 3.0 language.
See Also:
Serialized Form
  • Constructor Details

    • ParsedDerivedPredicate

      public ParsedDerivedPredicate(NamedTypedList head, Expression<String> body)
      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

      public final NamedTypedList getHead()
      Returns the head of the derived predicate.
      Returns:
      the head of the derived predicate.
    • setHead

      public final void setHead(NamedTypedList head)
      Sets the head of the derived predicate.
      Parameters:
      head - the head to set.
    • getBody

      public final Expression<String> getBody()
      Returns the body of the derived predicate.
      Returns:
      the body of the derived predicate.
    • setBody

      public final void setBody(Expression<String> body)
      Sets the body of this derived predicate.
      Parameters:
      body - the body to set.
    • equals

      public boolean equals(Object obj)
      Returns if this derived predicate is equal to another object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the other object.
      Returns:
      true if obj is not null, is an instance of the class ParsedDerivedPredicate and has the same head and body; otherwise it returns false.
      See Also:
      Object.equals(java.lang.Object)
    • hashCode

      public int hashCode()
      Returns the hash code value of the derived predicate.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code value of the derived predicate.
      See Also:
      Object.hashCode()
    • toString

      public String toString()
      Returns a string representation of this derived predicate.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this derived predicate.
      See Also:
      Object.toString()