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.utilAbstractSoftMap.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 |
|---|---|
int |
getMaxSize() |
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, equals, hashCode, isEmpty, keySet, putAll, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic 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.Copyright © 2014–2015 Philip Helger. All rights reserved.