K - the key typeV - the value typepublic class ManagedMap<K,V> extends LinkedHashMap<K,V> implements Mergeable, BeanMetadataElement
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
ManagedMap() |
ManagedMap(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
String |
getKeyTypeName()
Return the default key type name (class name) to be used for this map.
|
Object |
getSource()
Return the configuration source
Object for this metadata element
(may be null). |
String |
getValueTypeName()
Return the default value type name (class name) to be used for this map.
|
boolean |
isMergeEnabled()
Is merging enabled for this particular instance?
|
Object |
merge(Object parent)
Merge the current value set with that of the supplied object.
|
static <K,V> ManagedMap<K,V> |
ofEntries(Map.Entry<? extends K,? extends V>... entries)
Return a new instance containing keys and values extracted from the
given entries.
|
void |
setKeyTypeName(String keyTypeName)
Set the default key type name (class name) to be used for this map.
|
void |
setMergeEnabled(boolean mergeEnabled)
Set whether merging should be enabled for this collection,
in case of a 'parent' collection value being present.
|
void |
setSource(Object source)
Set the configuration source
Object for this metadata element. |
void |
setValueTypeName(String valueTypeName)
Set the default value type name (class name) to be used for this map.
|
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size@SafeVarargs public static <K,V> ManagedMap<K,V> ofEntries(Map.Entry<? extends K,? extends V>... entries)
K - the Map's key typeV - the Map's value typeentries - Map.Entrys containing the keys and values
from which the map is populatedMap containing the specified mappingspublic void setSource(@Nullable
Object source)
Object for this metadata element.
The exact type of the object will depend on the configuration mechanism used.
@Nullable public Object getSource()
BeanMetadataElementObject for this metadata element
(may be null).getSource in interface BeanMetadataElementpublic void setKeyTypeName(@Nullable
String keyTypeName)
@Nullable public String getKeyTypeName()
public void setValueTypeName(@Nullable
String valueTypeName)
@Nullable public String getValueTypeName()
public void setMergeEnabled(boolean mergeEnabled)
public boolean isMergeEnabled()
MergeableisMergeEnabled in interface Mergeable