Class ConcurrentLinkedHashMap.BoundedEntryWeigher<K,V>
java.lang.Object
com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap.BoundedEntryWeigher<K,V>
- All Implemented Interfaces:
EntryWeigher<K,
,V> Serializable
- Enclosing class:
ConcurrentLinkedHashMap<K,
V>
static final class ConcurrentLinkedHashMap.BoundedEntryWeigher<K,V>
extends Object
implements EntryWeigher<K,V>, Serializable
A weigher that enforces that the weight falls within a valid range.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final long
(package private) final EntryWeigher
<? super K, ? super V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Measures an entry's weight to determine how many units of capacity that the key and value consumes.(package private) Object
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
weigher
-
-
Constructor Details
-
BoundedEntryWeigher
BoundedEntryWeigher(EntryWeigher<? super K, ? super V> weigher)
-
-
Method Details
-
weightOf
Description copied from interface:EntryWeigher
Measures an entry's weight to determine how many units of capacity that the key and value consumes. An entry must consume a minimum of one unit.- Specified by:
weightOf
in interfaceEntryWeigher<K,
V> - Parameters:
key
- the key to weighvalue
- the value to weigh- Returns:
- the entry's weight
-
writeReplace
Object writeReplace()
-