Package mc.core.domain.generic
Class AttributeValues
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<AttributeValue>,Collection<AttributeValue>,List<AttributeValue>,RandomAccess
public class AttributeValues
extends ArrayList<AttributeValue>
implements Serializable, Iterable<AttributeValue>
container for AttributeValue list with convenience methods for getting values for object or attribute
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAttributeValues(int initialCapacity) AttributeValues(List<AttributeValue> values) -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeValuesempty()get(ComplexEntity entity) get attribute values for entity or all if entity is nullget(ComplexEntity entity, boolean includeInherited) get attribute values for entity, or all if entity is null, also inherited attributesget(ComplexEntity entity, Attribute a) get attribute value for entity and attribute if in list, otherwise nullget attribute values for attribute or all if attribute is nullget(AttributeType at) get attribute values for attribute typegetAttributeValuesMap(Locale locale) Get attribute values as sorted map on collections of attributesgetBy(Collection collection) getCollections(AttributeType attributeType) static AttributeValuesof(List<AttributeValue> avs) Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll
-
Constructor Details
-
AttributeValues
public AttributeValues() -
AttributeValues
public AttributeValues(int initialCapacity) -
AttributeValues
-
-
Method Details
-
get
get attribute values for entity or all if entity is null -
get
get attribute values for entity, or all if entity is null, also inherited attributes -
get
get attribute values for attribute or all if attribute is null -
get
get attribute value for entity and attribute if in list, otherwise null -
get
get attribute values for attribute type -
getEntityToAttributes
-
getBy
- Parameters:
collection- mandatory- Returns:
- the AttributeValues belonging to given Collection as far as they are loaded in this list
-
getAttributeTypes
- Returns:
- Ordered list of
AttributeTypes of theAttributes in this object, sorted by prio and entity display. The list does not contain duplicates.
-
getCollections
- Parameters:
attributeType- optional- Returns:
- collections for given attributeType. all collections if null.
-
getAttributeValuesMap
Get attribute values as sorted map on collections of attributes- Returns:
- map
-
of
-
empty
-