Class NamedTypedList

java.lang.Object
fr.uga.pddl4j.parser.NamedTypedList
All Implemented Interfaces:
Serializable

public class NamedTypedList extends Object implements Serializable
This class is used to to parse in the atomic formula skeleton and atomic function skeleton.
See Also:
Serialized Form
  • Constructor Details

    • NamedTypedList

      public NamedTypedList(NamedTypedList list)
      Creates a named typed list from a specified typed list.
      Parameters:
      list - the list.
    • NamedTypedList

      public NamedTypedList(Symbol<String> name)
      Creates new named typed list with a specified name.
      Parameters:
      name - the name of the list.
    • NamedTypedList

      public NamedTypedList(Symbol<String> name, List<TypedSymbol<String>> arguments)
      Creates new named typed list with a specified name and list of argument.
      Parameters:
      name - the name of the list.
      arguments - the list of argument of the list.
  • Method Details

    • getName

      public final Symbol<String> getName()
      Returns the name of this typed list.
      Returns:
      the name of this typed list.
    • setName

      public final void setName(Symbol<String> name)
      Sets the name of this typed list.
      Parameters:
      name - the name to set.
    • getArguments

      public final List<TypedSymbol<String>> getArguments()
      Returns the list of arguments of this list.
      Returns:
      the list of arguments of this list.
    • getTypes

      public List<Symbol<String>> getTypes()
      Returns the list of types of this typed token.
      Returns:
      the list of types of this typed token.
    • addType

      public void addType(Symbol<String> type)
      Adds a type to this name type list.
      Parameters:
      type - the type to add.
    • equals

      public boolean equals(Object object)
      Return if this named typed list is equal to another object.
      Overrides:
      equals in class Object
      Parameters:
      object - the other object.
      Returns:
      true if this named typed list is equal to obj, i.e., other is not null and of type NamedTypedList and it has the same name and the same list of arguments and types; otherwise it returns false.
      See Also:
      Object.equals(Object)
    • hashCode

      public int hashCode()
      Returns the hash code value of this named typed list.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code value of this named typed list.
      See Also:
      Object.hashCode()
    • add

      public boolean add(TypedSymbol<String> arg)
      Add a new argument at the end of the list.
      Parameters:
      arg - the argument to add.
      Returns:
      true if the argument was added false otherwise.
    • toString

      public String toString()
      Returns a string representation of this named typed list.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this named typed list.