Package com.attivio.sdk.util
Class BaseTypesMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<K,V>
-
- com.attivio.sdk.util.BaseTypesMap<K,V>
-
- Type Parameters:
K
- The key type, usuallyString
V
- The value type, usuallyObject
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<K,V>
- Direct Known Subclasses:
MessageMetadata
,PropertyMap
public class BaseTypesMap<K,V> extends java.util.LinkedHashMap<K,V> implements java.io.Serializable
ALinkedHashMap
that checks the type of all keys and values against a set of predefined data types inVALID_CLASSES
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BaseTypesMap.BaseTypesEntry
-
Constructor Summary
Constructors Constructor Description BaseTypesMap()
Default constructor.BaseTypesMap(int initialCapacity)
Constructor that takes an initial capacity.BaseTypesMap(java.util.Map<? extends K,? extends V> m)
Create a new base types map from the existing map.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
checkType(java.lang.Object obj)
Checks the type of obj for null or one of the valid types, otherwise throws an IllegalArgumentException.BaseTypesMap<K,V>
clone()
Performs a deep clone of this map.BaseTypesMap.BaseTypesEntry[]
getEntries()
V
put(K key, V value)
void
putAll(java.util.Map<? extends K,? extends V> m)
void
setEntries(BaseTypesMap.BaseTypesEntry[] entries)
-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, putIfAbsent, remove, remove, replace, replace, size
-
-
-
-
Method Detail
-
checkType
public static final void checkType(java.lang.Object obj)
Checks the type of obj for null or one of the valid types, otherwise throws an IllegalArgumentException.
-
getEntries
public BaseTypesMap.BaseTypesEntry[] getEntries()
-
setEntries
public void setEntries(BaseTypesMap.BaseTypesEntry[] entries)
-
clone
public BaseTypesMap<K,V> clone()
Performs a deep clone of this map.
-
-