Package gov.nasa.pds.tools.label
Class GroupStatement
- java.lang.Object
-
- gov.nasa.pds.tools.label.Statement
-
- gov.nasa.pds.tools.label.GroupStatement
-
- All Implemented Interfaces:
Comparable<Object>
public class GroupStatement extends Statement
- Version:
- $Revision$
- Author:
- pramirez, jagander
-
-
Field Summary
-
Fields inherited from class gov.nasa.pds.tools.label.Statement
comment, identifier, label, lineNumber, sourceFile, sourceURI
-
-
Constructor Summary
Constructors Constructor Description GroupStatement(Label sourceLabel, int lineNumber, String identifier)
Constructs an empty group statementGroupStatement(Label sourceLabel, int lineNumber, String identifier, LinkedHashMap<DictIdentifier,List<Statement>> statements)
Constructs a group statement that contains the given statements
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
Constructor Detail
-
GroupStatement
public GroupStatement(Label sourceLabel, int lineNumber, String identifier)
Constructs an empty group statement- Parameters:
lineNumber
- at which this statement occursidentifier
- of the statementsourceLabel
- 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 occursidentifier
- of the statementstatements
- 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()
-
-