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
ConstructorsModifierConstructorDescriptionprotected
MapAttribute
(Class<?> keyClass, Class<? extends BaseAttribute> valueClass, Map<K, V> items) protected
MapAttribute
(Class<?> keyClass, Class<? extends BaseAttribute> valueClass, Map<K, V> items, Map<String, Object> extendedProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(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.boolean
isEmpty()
keySet()
void
int
size()
protected com.google.common.base.MoreObjects.ToStringHelper
values()
Methods inherited from class com.basistech.rosette.dm.BaseAttribute
getExtendedProperties, listOrNull, setExtendedProperty, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
size
in interfaceMap<K,
V extends BaseAttribute>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceMap<K,
V extends BaseAttribute>
-
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V extends BaseAttribute>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V extends BaseAttribute>
-
get
- Specified by:
get
in interfaceMap<K,
V extends BaseAttribute>
-
put
- Specified by:
put
in interfaceMap<K,
V extends BaseAttribute>
-
remove
- Specified by:
remove
in interfaceMap<K,
V extends BaseAttribute>
-
putAll
- Specified by:
putAll
in interfaceMap<K,
V extends BaseAttribute>
-
clear
public void clear()- Specified by:
clear
in interfaceMap<K,
V extends BaseAttribute>
-
keySet
- Specified by:
keySet
in interfaceMap<K,
V extends BaseAttribute>
-
values
- Specified by:
values
in interfaceMap<K,
V extends BaseAttribute>
-
entrySet
- Specified by:
entrySet
in interfaceMap<K,
V extends BaseAttribute>
-
toStringHelper
protected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()- Overrides:
toStringHelper
in classBaseAttribute
-