Class AttributeMetaData
- java.lang.Object
-
- de.aristaflow.adept2.core.orgmodelmanager.AttributeMetaData
-
- All Implemented Interfaces:
Serializable
,Iterable<AttributeMetaData.MetaDataElement>
public class AttributeMetaData extends Object implements Iterable<AttributeMetaData.MetaDataElement>, Serializable
AttributeMetaData
is a simple immutable container class forAttributeMetaData.MetaDataElement
-objects, supposed to conveniently hold all available meta information about the attributes of one entity type.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AttributeMetaData.MetaDataElement
Used to hold information about a single attribute.
-
Constructor Summary
Constructors Constructor Description AttributeMetaData(AttributeMetaData.MetaDataElement[] metaDataElements)
Constructs a newAttributeMetaData
-object containing the givenAttributeMetaData.MetaDataElement
s.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeMetaData.MetaDataElement
get(int index)
Returns theAttributeMetaData.MetaDataElement
at the given index.AttributeMetaData.MetaDataElement
get(String attrName)
Returns theAttributeMetaData.MetaDataElement
for the given attribute name ornull
if none is contained for this attribute name.int
getCount()
Returns the number ofAttributeMetaData.MetaDataElement
s held by this container.String[]
getNames()
Returns the names of all attributes in a new array.Iterator<AttributeMetaData.MetaDataElement>
iterator()
AttributeMetaData.MetaDataElement[]
toArray()
Returns an array containing allAttributeMetaData.MetaDataElement
s.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
AttributeMetaData
public AttributeMetaData(AttributeMetaData.MetaDataElement[] metaDataElements)
Constructs a newAttributeMetaData
-object containing the givenAttributeMetaData.MetaDataElement
s.- Parameters:
metaDataElements
- theAttributeMetaData.MetaDataElement
s this container should hold
-
-
Method Detail
-
getNames
public String[] getNames()
Returns the names of all attributes in a new array.- Returns:
- the names of all attributes in a new array
-
getCount
public int getCount()
Returns the number ofAttributeMetaData.MetaDataElement
s held by this container.- Returns:
- the number of
AttributeMetaData.MetaDataElement
s held by this container
-
get
public AttributeMetaData.MetaDataElement get(int index)
Returns theAttributeMetaData.MetaDataElement
at the given index.- Parameters:
index
- the index for which theAttributeMetaData.MetaDataElement
should be returned- Returns:
- the
AttributeMetaData.MetaDataElement
at the given index
-
get
public AttributeMetaData.MetaDataElement get(String attrName)
Returns theAttributeMetaData.MetaDataElement
for the given attribute name ornull
if none is contained for this attribute name.- Parameters:
attrName
- the attribute name for which theAttributeMetaData.MetaDataElement
should be returned- Returns:
- the
AttributeMetaData.MetaDataElement
for the given attribute name ornull
if none is contained for this attribute name
-
toArray
public AttributeMetaData.MetaDataElement[] toArray()
Returns an array containing allAttributeMetaData.MetaDataElement
s.- Returns:
- an array containing all
AttributeMetaData.MetaDataElement
s
-
iterator
public Iterator<AttributeMetaData.MetaDataElement> iterator()
- Specified by:
iterator
in interfaceIterable<AttributeMetaData.MetaDataElement>
-
-