gov.nasa.pds.tools.label
Class GroupStatement

java.lang.Object
  extended by gov.nasa.pds.tools.label.Statement
      extended by gov.nasa.pds.tools.label.GroupStatement
All Implemented Interfaces:
Comparable<Object>

public class GroupStatement
extends Statement

Version:
$Revision: 8250 $
Author:
pramirez, jagander

Field Summary
 
Fields inherited from class gov.nasa.pds.tools.label.Statement
comment, identifier, label, lineNumber, sourceFile, sourceURI
 
Constructor Summary
GroupStatement(Label sourceLabel, int lineNumber, String identifier)
          Constructs an empty group statement
GroupStatement(Label sourceLabel, int lineNumber, String identifier, Map<DictIdentifier,List<Statement>> statements)
          Constructs a group statement that contains the given statements
 
Method Summary
 void addStatement(Statement statement)
           
 boolean equals(Object object)
           
 AttributeStatement getAttribute(String id)
          Retrieves the named attribute.
 List<AttributeStatement> getAttributes()
          Retrieves the attributes of this group.
 List<Statement> getStatements()
           
 boolean hasAttribute(String id)
           
 int hashcode()
           
 
Methods inherited from class gov.nasa.pds.tools.label.Statement
attachComment, compareTo, getComment, getIdentifier, getLabel, getLineNumber, getSourceFile, getSourceString, getSourceURI, toString, validateCommentType, validateElementType, validateGroupType, validateObjectType, validatePointerType, validateType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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,
                      Map<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)

getStatements

public List<Statement> getStatements()

equals

public boolean equals(Object object)
Overrides:
equals in class Object

hashcode

public int hashcode()


Copyright © 2005-2011 Planetary Data System. All Rights Reserved.