Class ObjectStatement

  • All Implemented Interfaces:
    Comparable<Object>

    public class ObjectStatement
    extends Statement
    Version:
    $Revision$
    Author:
    pramirez, jagander
    • Constructor Detail

      • ObjectStatement

        public ObjectStatement​(Label sourceLabel,
                               int lineNumber,
                               String identifier)
        Constructs a new object statement with no attributes or nested objects
        Parameters:
        lineNumber - Line number of the statement.
        identifier - Identifier for the statement.
      • ObjectStatement

        public ObjectStatement​(Label sourceLabel,
                               String identifier)
        Constructs an ObjectStatement with only an identifier
        Parameters:
        identifier - Identifier of the statement
      • ObjectStatement

        public ObjectStatement​(Label sourceLabel,
                               int lineNumber,
                               String identifier,
                               LinkedHashMap<DictIdentifier,​List<Statement>> statements)
        Constructs an ObjectStatement
        Parameters:
        lineNumber - Line number of statement
        identifier - Identifier of statement
        statements - Map of Statement associated with this object
    • Method Detail

      • getAttributes

        public List<AttributeStatement> getAttributes()
        Retrieves the list of attributes associated with the ObjectStatement
        Returns:
        The list of AttributeStatement
      • hasPointer

        public boolean hasPointer​(DictIdentifier id)
        Looks to see if this object contains a pointer with the given identifier
        Parameters:
        id - of pointer statement to look for
        Returns:
        flag indicating whether or not the pointer was found
      • getAttribute

        public AttributeStatement getAttribute​(DictIdentifier id)
        Retrieves the named attribute
        Parameters:
        id -
        Returns:
        The named AttributeStatement or null if not found
      • getPointer

        public PointerStatement getPointer​(DictIdentifier id)
        Retrieves the named pointer
        Parameters:
        id -
        Returns:
        The named PointerStatement or null if not found
      • getObjects

        public List<ObjectStatement> getObjects()
        Retrieves the list of objects associated with this object
        Returns:
        The list of ObjectStatement
      • addStatement

        public void addStatement​(Statement statement)
        Associates a statement with this object
        Parameters:
        statement - to be added to object
      • hashcode

        public int hashcode()