Class EquivalentHashMap<K,V>
- java.lang.Object
-
- org.infinispan.commons.util.AbstractMap<K,V>
-
- org.infinispan.commons.equivalence.EquivalentHashMap<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,V>
- Direct Known Subclasses:
EquivalentLinkedHashMap
public class EquivalentHashMap<K,V> extends AbstractMap<K,V>
Deprecated.Custom hash-based map which accepts no null keys nor null values, where equality and hash code calculations are done based on passedEquivalence
function implementations for keys and values, as opposed to relying on their own equals/hashCode/toString implementations. This is handy when using key/values whose mentioned methods cannot be overriden, i.e. arrays, and in situations where users want to avoid using wrapper objects. This hash map implementation is optimised for store/retrieval rather than iteration. Internal node entries are not linked, so responsibility to link them falls on the iterators.- Since:
- 5.3
- Author:
- Galder ZamarreƱo
- See Also:
HashMap
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
EquivalentHashMap.EntrySet
Deprecated.protected static class
EquivalentHashMap.Node<K,V>
Deprecated.class
EquivalentHashMap.Values
Deprecated.-
Nested classes/interfaces inherited from class org.infinispan.commons.util.AbstractMap
AbstractMap.SimpleEntry<K,V>
-
-
Field Summary
-
Fields inherited from class org.infinispan.commons.util.AbstractMap
entrySet, keySet, values
-
-
Constructor Summary
Constructors Constructor Description EquivalentHashMap(int initialCapacity, float loadFactor, Equivalence<? super K> keyEq, Equivalence<? super V> valueEq)
Deprecated.EquivalentHashMap(int initialCapacity, Equivalence<? super K> keyEq, Equivalence<? super V> valueEq)
Deprecated.EquivalentHashMap(java.util.Map<? extends K,? extends V> map, Equivalence<? super K> keyEq, Equivalence<? super V> valueEq)
Deprecated.EquivalentHashMap(Equivalence<? super K> keyEq, Equivalence<? super V> valueEq)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clear()
Deprecated.boolean
containsKey(java.lang.Object key)
Deprecated.boolean
containsValue(java.lang.Object value)
Deprecated.java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
Deprecated.boolean
equals(java.lang.Object o)
Deprecated.V
get(java.lang.Object key)
Deprecated.Equivalence<? super K>
getKeyEquivalence()
Deprecated.Equivalence<? super V>
getValueEquivalence()
Deprecated.boolean
isEmpty()
Deprecated.java.util.Set<K>
keySet()
Deprecated.V
put(K key, V value)
Deprecated.void
putAll(java.util.Map<? extends K,? extends V> map)
Deprecated.V
remove(java.lang.Object key)
Deprecated.int
size()
Deprecated.java.util.Collection<V>
values()
Deprecated.-
Methods inherited from class org.infinispan.commons.util.AbstractMap
assertKeyNotNull, eq, hash, hashCode
-
-
-
-
Constructor Detail
-
EquivalentHashMap
public EquivalentHashMap(Equivalence<? super K> keyEq, Equivalence<? super V> valueEq)
Deprecated.
-
EquivalentHashMap
public EquivalentHashMap(int initialCapacity, Equivalence<? super K> keyEq, Equivalence<? super V> valueEq)
Deprecated.
-
EquivalentHashMap
public EquivalentHashMap(int initialCapacity, float loadFactor, Equivalence<? super K> keyEq, Equivalence<? super V> valueEq)
Deprecated.
-
EquivalentHashMap
public EquivalentHashMap(java.util.Map<? extends K,? extends V> map, Equivalence<? super K> keyEq, Equivalence<? super V> valueEq)
Deprecated.
-
-
Method Detail
-
size
public int size()
Deprecated.
-
isEmpty
public boolean isEmpty()
Deprecated.
-
containsKey
public boolean containsKey(java.lang.Object key)
Deprecated.
-
containsValue
public boolean containsValue(java.lang.Object value)
Deprecated.
-
get
public V get(java.lang.Object key)
Deprecated.
-
remove
public V remove(java.lang.Object key)
Deprecated.
-
clear
public void clear()
Deprecated.
-
equals
public boolean equals(java.lang.Object o)
Deprecated.
-
getKeyEquivalence
public Equivalence<? super K> getKeyEquivalence()
Deprecated.
-
getValueEquivalence
public Equivalence<? super V> getValueEquivalence()
Deprecated.
-
keySet
public java.util.Set<K> keySet()
Deprecated.
-
values
public java.util.Collection<V> values()
Deprecated.
-
-