LinkedHashMap
and implement LinkedHashMap.removeEldestEntry(java.util.Map.Entry<K, V>)
to enforce a maximum number of entries.@Deprecated public class BoundedLinkedHashMap extends LinkedHashMap
BoundedLinkedHashMap is a bounded
LinkedHashMap. The bound is the maximum
number of entries the BoundedLinkedHashMap
can contain.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
BoundedLinkedHashMap(int maximumNumberOfEntries)
Deprecated.
Constructor.
|
BoundedLinkedHashMap(int initialCapacity,
float loadFactor,
int maximumNumberOfEntries)
Deprecated.
Constructor.
|
BoundedLinkedHashMap(int initialCapacity,
int maximumNumberOfEntries)
Deprecated.
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMaximumNumberOfEntries()
Deprecated.
Returns the maximum number of entries.
|
clear, containsValue, getclone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, valuesequals, hashCode, toStringpublic BoundedLinkedHashMap(int initialCapacity,
float loadFactor,
int maximumNumberOfEntries)
initialCapacity - The initial capacity.loadFactor - The load factormaximumNumberOfEntries - The maximum number of allowed entriespublic BoundedLinkedHashMap(int initialCapacity,
int maximumNumberOfEntries)
initialCapacity - The initial capacity.maximumNumberOfEntries - The maximum number of allowed entriespublic BoundedLinkedHashMap(int maximumNumberOfEntries)
maximumNumberOfEntries - The maximum number of allowed entriesCopyright © 1997-2017 Pivotal Software, Inc. All rights reserved.