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.util
SoftLinkedHashMap
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, size
clone, containsKey, containsValue, isEmpty, keySet, putAll, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, 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, setAll
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, values
public 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–2019 Philip Helger. All rights reserved.