Class SoftLinkedHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
com.helger.commons.collection.map.AbstractSoftMap<K,V>
com.helger.commons.collection.map.SoftLinkedHashMap<K,V>
- Type Parameters:
K- Key typeV- Value type
- All Implemented Interfaces:
ICommonsMap<K,,V> ICloneable<ICommonsMap<K,,V>> Map<K,V>
Soft
The
Note:
HashMap implementation based on
http://www.javaspecialists.eu/archive/Issue015.htmlThe
entrySet implementation is from
org.hypergraphdb.utilNote:
SoftLinkedHashMap is NOT serializable!- Author:
- Philip Helger
-
Nested Class Summary
Nested classes/interfaces inherited from class com.helger.commons.collection.map.AbstractSoftMap
AbstractSoftMap.SoftValue<K,V> Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields inherited from class com.helger.commons.collection.map.AbstractSoftMap
m_aSrcMap -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.helger.commons.collection.map.AbstractSoftMap
clear, entrySet, get, onEntryRemoved, put, remove, sizeMethods inherited from class java.util.AbstractMap
clone, containsKey, containsValue, isEmpty, keySet, putAll, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.commons.collection.impl.ICommonsMap
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, setAllMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, values
-
Constructor Details
-
SoftLinkedHashMap
-
-
Method Details
-
getMaxSize
- Returns:
- The maximum number of elements that can reside inside this object. Never < 0.
-
onRemoveEldestEntry
@OverrideOnDemand protected void onRemoveEldestEntry(@Nonnegative int nSize, @Nonnull Map.Entry<K, V> aEldest) Protected method that is invoked every time the oldest entry is removed.- Parameters:
nSize- Current size of the map. Always ≥ 0.aEldest- The map entry that is removed. Nevernull.
-
getClone
- Returns:
- A 100% deep-copy of the implementing class.
-
equals
-
hashCode
public int hashCode()
-