Package fr.uga.pddl4j.parser
Class NamedTypedList
java.lang.Object
fr.uga.pddl4j.parser.NamedTypedList
- All Implemented Interfaces:
Serializable
This class is used to to parse in the atomic formula skeleton and atomic function skeleton.
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorDescriptionNamedTypedList(NamedTypedList list)
Creates a named typed list from a specified typed list.NamedTypedList(Symbol<String> name)
Creates new named typed list with a specified name.NamedTypedList(Symbol<String> name, List<TypedSymbol<String>> arguments)
Creates new named typed list with a specified name and list of argument. -
Method Summary
Modifier and TypeMethodDescriptionboolean
add(TypedSymbol<String> arg)
Add a new argument at the end of the list.void
Adds a type to this name type list.boolean
Return if this named typed list is equal to another object.Returns the list of arguments of this list.getName()
Returns the name of this typed list.getTypes()
Returns the list of types of this typed token.int
hashCode()
Returns the hash code value of this named typed list.void
Sets the name of this typed list.toString()
Returns a string representation of this named typed list.
-
Constructor Details
-
NamedTypedList
Creates a named typed list from a specified typed list.- Parameters:
list
- the list.
-
NamedTypedList
Creates new named typed list with a specified name.- Parameters:
name
- the name of the list.
-
NamedTypedList
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
Returns the name of this typed list.- Returns:
- the name of this typed list.
-
setName
Sets the name of this typed list.- Parameters:
name
- the name to set.
-
getArguments
Returns the list of arguments of this list.- Returns:
- the list of arguments of this list.
-
getTypes
Returns the list of types of this typed token.- Returns:
- the list of types of this typed token.
-
addType
Adds a type to this name type list.- Parameters:
type
- the type to add.
-
equals
Return if this named typed list is equal to another object.- Overrides:
equals
in classObject
- Parameters:
object
- the other object.- Returns:
true
if this named typed list is equal toobj
, i.e.,other
is not null and of typeNamedTypedList
and it has the same name and the same list of arguments and types; otherwise it returnsfalse
.- See Also:
Object.equals(Object)
-
hashCode
public int hashCode()Returns the hash code value of this named typed list.- Overrides:
hashCode
in classObject
- Returns:
- the hash code value of this named typed list.
- See Also:
Object.hashCode()
-
add
Add a new argument at the end of the list.- Parameters:
arg
- the argument to add.- Returns:
true
if the argument was addedfalse
otherwise.
-
toString
Returns a string representation of this named typed list.
-