Class GroupStatement

  • All Implemented Interfaces:
    Comparable<Object>

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

      • GroupStatement

        public GroupStatement​(Label sourceLabel,
                              int lineNumber,
                              String identifier)
        Constructs an empty group statement
        Parameters:
        lineNumber - at which this statement occurs
        identifier - of the statement
        sourceLabel - in which this statement occurs
      • GroupStatement

        public GroupStatement​(Label sourceLabel,
                              int lineNumber,
                              String identifier,
                              LinkedHashMap<DictIdentifier,​List<Statement>> statements)
        Constructs a group statement that contains the given statements
        Parameters:
        lineNumber - at which this statement occurs
        identifier - of the statement
        statements - contained within this group statement
    • Method Detail

      • getAttribute

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

        public List<AttributeStatement> getAttributes()
        Retrieves the attributes of this group.
        Returns:
        The list of AttributeStatment nested within this group
      • addStatement

        public void addStatement​(Statement statement)
      • hasAttribute

        public boolean hasAttribute​(String id)
      • hashcode

        public int hashcode()