Package repast.simphony.scenario.data
Class AttributeContainer
- java.lang.Object
-
- repast.simphony.scenario.data.AttributeContainer
-
- Direct Known Subclasses:
ContextData
,ProjectionData
public abstract class AttributeContainer extends Object
Abstract base class for meta data that contains attributes and an id.- Author:
- Nick Collier
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Attribute>
attributes
protected String
id
-
Constructor Summary
Constructors Constructor Description AttributeContainer(String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttribute(Attribute attribute)
Adds an attribute to this AttributeContainer.Iterable<Attribute>
attributes()
Gets an iterable over the attributes this contains.int
getAttributeCount()
Gets the number of attributes contained by this container.String
getId()
Gets the id of this attribute container.
-
-
-
Constructor Detail
-
AttributeContainer
public AttributeContainer(String id)
-
-
Method Detail
-
getId
public String getId()
Gets the id of this attribute container.- Returns:
- the id of this attribute container.
-
addAttribute
public void addAttribute(Attribute attribute)
Adds an attribute to this AttributeContainer.- Parameters:
attribute
- the attribute to add
-
attributes
public Iterable<Attribute> attributes()
Gets an iterable over the attributes this contains.- Returns:
- an iterable over the attributes this contains.
-
getAttributeCount
public int getAttributeCount()
Gets the number of attributes contained by this container.- Returns:
- the number of attributes contained by this container.
-
-