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 of
Object.equals(Object).- See Also:
-
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> -
Field Summary
Fields inherited from class org.apache.commons.collections4.map.AbstractHashedMap
DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR, DEFAULT_THRESHOLD, GETKEY_INVALID, GETVALUE_INVALID, MAXIMUM_CAPACITY, NO_NEXT_ENTRY, NO_PREVIOUS_ENTRY, NULL, REMOVE_INVALID, SETVALUE_INVALID -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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
Modifier and TypeMethodDescriptionprotected booleanisEqualKey(Object key1, Object key2) protected booleanisEqualValue(Object value1, Object value2) Methods inherited from class org.apache.commons.collections4.map.HashedMap
cloneMethods 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, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
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.
-
-
Method Details