Class UriCanonicalizer.BoundedHashMap
java.lang.Object
java.util.AbstractMap<UriCanonicalizer.CanonicalKey, String>
java.util.HashMap<UriCanonicalizer.CanonicalKey, String>
java.util.LinkedHashMap<UriCanonicalizer.CanonicalKey, String>
com.fasterxml.aalto.util.UriCanonicalizer.BoundedHashMap
- All Implemented Interfaces:
Serializable, Cloneable, Map<UriCanonicalizer.CanonicalKey, String>, SequencedMap<UriCanonicalizer.CanonicalKey, String>
- Enclosing class:
UriCanonicalizer
static final class UriCanonicalizer.BoundedHashMap
extends LinkedHashMap<UriCanonicalizer.CanonicalKey, String>
We'll use a bounded map, which should work well for most normal
cases, but avoid excesses for degenerate cases (unique URIs
used as idenfitiers etc).
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intLet's create cache big enough to usually have enough space for all/most entries for normal cases, but that won't grow indefinitely for degenerate casesprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanMethods inherited from class LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class AbstractMap
equals, hashCode, toStringMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from interface SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Field Details
-
DEFAULT_SIZE
private static final int DEFAULT_SIZELet's create cache big enough to usually have enough space for all/most entries for normal cases, but that won't grow indefinitely for degenerate cases- See Also:
-
MAX_SIZE
private static final int MAX_SIZE- See Also:
-
-
Constructor Details
-
BoundedHashMap
public BoundedHashMap()
-
-
Method Details
-
removeEldestEntry
- Overrides:
removeEldestEntryin classLinkedHashMap<UriCanonicalizer.CanonicalKey, String>
-