K - Key typeV - Value typepublic class SoftLinkedHashMap<K,V> extends AbstractSoftMap<K,V>
HashMap implementation based on
http://www.javaspecialists.eu/archive/Issue015.htmlentrySet implementation is from
org.hypergraphdb.utilSoftLinkedHashMap is NOT serializable!AbstractSoftMap.SoftValue<K,V>AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>m_aSrcMap| Constructor and Description |
|---|
SoftLinkedHashMap(int nMaxSize) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
SoftLinkedHashMap<K,V> |
getClone() |
int |
getMaxSize() |
int |
hashCode() |
protected void |
onRemoveEldestEntry(int nSize,
Map.Entry<K,V> aEldest)
Protected method that is invoked every time the oldest entry is removed.
|
clear, entrySet, get, onEntryRemoved, put, remove, sizeclone, containsKey, containsValue, isEmpty, keySet, putAll, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitaddAll, containsAnyEntry, containsAnyKey, containsAnyValue, copyOfEntrySet, copyOfKeySet, copyOfKeySet, copyOfValues, copyOfValues, copyOfValuesMapped, copyOfValuesMapped, createInstance, findFirstEntry, findFirstKey, findFirstValue, forEach, forEachKey, forEachKey, forEachValue, forEachValue, getAsUnmodifiable, getFirstEntry, getFirstEntry, getFirstKey, getFirstKey, getFirstValue, getFirstValue, getSortedByKey, getSortedByValue, getSwappedKeyValues, isNotEmpty, put, putAll, putAll, putAllMapped, putAllMapped, putAllMapped, putIf, putIfNotNull, removeAll, removeIf, removeIfKey, removeIfValue, removeObject, setAllcompute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, valuespublic SoftLinkedHashMap(@Nonnegative int nMaxSize)
@Nonnegative public final int getMaxSize()
@OverrideOnDemand protected void onRemoveEldestEntry(@Nonnegative int nSize, @Nonnull Map.Entry<K,V> aEldest)
nSize - Current size of the map. Always ≥ 0.aEldest - The map entry that is removed. Never null.@Nonnull @ReturnsMutableCopy public SoftLinkedHashMap<K,V> getClone()
public boolean equals(Object o)
Copyright © 2014–2020 Philip Helger. All rights reserved.