Package de.aristaflow.adept2.util
Class CollectionTools.IdentityMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- org.apache.commons.collections4.map.AbstractHashedMap<K,V>
-
- org.apache.commons.collections4.map.HashedMap<K,V>
-
- de.aristaflow.adept2.util.CollectionTools.IdentityMap<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
,Cloneable
,Map<K,V>
,org.apache.commons.collections4.Get<K,V>
,org.apache.commons.collections4.IterableGet<K,V>
,org.apache.commons.collections4.IterableMap<K,V>
,org.apache.commons.collections4.Put<K,V>
- Enclosing class:
- CollectionTools
public static final class CollectionTools.IdentityMap<K,V> extends org.apache.commons.collections4.map.HashedMap<K,V>
A map considering equalling keys and values based on object identity instead ofObject.equals(Object)
.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.commons.collections4.map.AbstractHashedMap
org.apache.commons.collections4.map.AbstractHashedMap.EntrySet<K extends Object,V extends Object>, org.apache.commons.collections4.map.AbstractHashedMap.EntrySetIterator<K extends Object,V extends Object>, org.apache.commons.collections4.map.AbstractHashedMap.HashEntry<K extends Object,V extends Object>, org.apache.commons.collections4.map.AbstractHashedMap.HashIterator<K extends Object,V extends Object>, org.apache.commons.collections4.map.AbstractHashedMap.HashMapIterator<K extends Object,V extends Object>, org.apache.commons.collections4.map.AbstractHashedMap.KeySet<K extends Object>, org.apache.commons.collections4.map.AbstractHashedMap.KeySetIterator<K extends Object>, org.apache.commons.collections4.map.AbstractHashedMap.Values<V extends Object>, org.apache.commons.collections4.map.AbstractHashedMap.ValuesIterator<V extends Object>
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description IdentityMap()
Creates a new map equalling keys and values based on object identity.IdentityMap(int initialCapacity)
Creates a new map equalling keys and values based on object identity with the designated initial capacity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isEqualKey(Object key1, Object key2)
protected boolean
isEqualValue(Object value1, Object value2)
-
Methods inherited from class org.apache.commons.collections4.map.AbstractHashedMap
addEntry, addMapping, calculateNewCapacity, calculateThreshold, checkCapacity, clear, containsKey, containsValue, convertKey, createEntry, createEntrySetIterator, createKeySetIterator, createValuesIterator, destroyEntry, doReadObject, doWriteObject, ensureCapacity, entryHashCode, entryKey, entryNext, entrySet, entryValue, equals, get, getEntry, hash, hashCode, hashIndex, init, isEmpty, keySet, mapIterator, put, putAll, remove, removeEntry, removeMapping, reuseEntry, size, toString, updateEntry, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Constructor Detail
-
IdentityMap
public IdentityMap()
Creates a new map equalling keys and values based on object identity.
-
IdentityMap
public IdentityMap(int initialCapacity)
Creates a new map equalling keys and values based on object identity with the designated initial capacity.- Parameters:
initialCapacity
- The initial capacity of the created map.
-
-