Package com.basistech.rosette.dm
Class MapAttribute<K,V extends BaseAttribute>
java.lang.Object
com.basistech.rosette.dm.BaseAttribute
com.basistech.rosette.dm.MapAttribute<K,V>
- Type Parameters:
K- The type of the keys in the map.V- The type of the values in the map.
- All Implemented Interfaces:
Serializable,Map<K,V>
public class MapAttribute<K,V extends BaseAttribute>
extends BaseAttribute
implements Map<K,V>, Serializable
A container for a keyed collection of attributes of a type.
Like all other attributes, it stores extended properties.
It is immutable and throws for attempts to use methods that would modify it.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.basistech.rosette.dm.BaseAttribute
extendedProperties -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMapAttribute(Class<?> keyClass, Class<? extends BaseAttribute> valueClass, Map<K, V> items) protectedMapAttribute(Class<?> keyClass, Class<? extends BaseAttribute> valueClass, Map<K, V> items, Map<String, Object> extendedProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()getItems()Internal use API used in Jackson serialization.Class<?>Internal use method for Jackson/Json serialization.Class<? extends BaseAttribute>Internal use method for Jackson/Json serialization.booleanisEmpty()keySet()voidintsize()protected com.google.common.base.MoreObjects.ToStringHelpervalues()Methods inherited from class com.basistech.rosette.dm.BaseAttribute
getExtendedProperties, listOrNull, setExtendedProperty, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
MapAttribute
-
MapAttribute
-
-
Method Details
-
getItems
Internal use API used in Jackson serialization.- Returns:
- the map itself.
-
getKeyClass
Internal use method for Jackson/Json serialization.- Returns:
- the class of the keys in this list.
-
getValueClass
Internal use method for Jackson/Json serialization.- Returns:
- the class of the values in this list.
-
size
public int size()- Specified by:
sizein interfaceMap<K,V extends BaseAttribute>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceMap<K,V extends BaseAttribute>
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V extends BaseAttribute>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V extends BaseAttribute>
-
get
- Specified by:
getin interfaceMap<K,V extends BaseAttribute>
-
put
- Specified by:
putin interfaceMap<K,V extends BaseAttribute>
-
remove
- Specified by:
removein interfaceMap<K,V extends BaseAttribute>
-
putAll
- Specified by:
putAllin interfaceMap<K,V extends BaseAttribute>
-
clear
public void clear()- Specified by:
clearin interfaceMap<K,V extends BaseAttribute>
-
keySet
- Specified by:
keySetin interfaceMap<K,V extends BaseAttribute>
-
values
- Specified by:
valuesin interfaceMap<K,V extends BaseAttribute>
-
entrySet
- Specified by:
entrySetin interfaceMap<K,V extends BaseAttribute>
-
toStringHelper
protected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()- Overrides:
toStringHelperin classBaseAttribute
-