public class EquivalentLinkedHashMap<K,V> extends EquivalentHashMap<K,V>
Equivalence
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.
In order to provide linked list behaviour, entries are linked with each
other in a predictable order.Modifier and Type | Class and Description |
---|---|
static class |
EquivalentLinkedHashMap.IterationOrder |
EquivalentHashMap.EntrySet, EquivalentHashMap.Node<K,V>, EquivalentHashMap.Values
AbstractMap.SimpleEntry<K,V>
entrySet, keySet, values
Constructor and Description |
---|
EquivalentLinkedHashMap(int initialCapacity,
float loadFactor,
EquivalentLinkedHashMap.IterationOrder iterationOrder,
Equivalence<? super K> keyEq,
Equivalence<? super V> valueEq) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
V |
get(Object key) |
V |
remove(Object key) |
protected boolean |
removeEldestEntry(Map.Entry<K,V> eldest) |
containsKey, containsValue, entrySet, equals, getKeyEquivalence, getValueEquivalence, isEmpty, keySet, put, putAll, size, values
assertKeyNotNull, eq, hash, hashCode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public EquivalentLinkedHashMap(int initialCapacity, float loadFactor, EquivalentLinkedHashMap.IterationOrder iterationOrder, Equivalence<? super K> keyEq, Equivalence<? super V> valueEq)
Copyright © 2015 JBoss, a division of Red Hat. All rights reserved.