Class TypedSymbol<T>

java.lang.Object
fr.uga.pddl4j.parser.Symbol<T>
fr.uga.pddl4j.parser.TypedSymbol<T>
All Implemented Interfaces:
Serializable

public class TypedSymbol<T> extends Symbol<T>
This interface defines the interface of the typed symbols.
See Also:
Serialized Form
  • Constructor Details

    • TypedSymbol

      public TypedSymbol(TypedSymbol<T> other)
      Creates a typed symbol from a specified typed symbol.
      Parameters:
      other - the other symbol.
      Throws:
      NullPointerException - if the specified typed symbol is null.
    • TypedSymbol

      public TypedSymbol(SymbolType type, T value)
      Creates a new typed symbol from a specified symbol. This symbol is by default of type object. If a typed symbol is created with the specified symbol Parser.OBJECT or Parser.NUMBER, the typed list is creates with an empty list of super types.
      Parameters:
      type - the type of symbol.
      value - the value of the symbol.
    • TypedSymbol

      public TypedSymbol(Symbol<T> symbol)
      Creates a new typed symbol from a specified symbol. This symbol is by default of type object. If a typed symbol is created with the specified symbol Parser.OBJECT or Parser.NUMBER, the typed list is creates with an empty list of super types.
      Parameters:
      symbol - the symbol.
  • Method Details

    • getTypes

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

      public void addType(Symbol<T> type)
      Adds a type to this typed token.
      Parameters:
      type - the type to add.
    • toString

      public String toString()
      Returns a string representation of this typed symbol.
      Overrides:
      toString in class Symbol<T>
      Returns:
      a string representation of this typed symbol.