Class Weighers.EntryWeigherView<K,V>
- java.lang.Object
-
- com.googlecode.concurrentlinkedhashmap.Weighers.EntryWeigherView<K,V>
-
- All Implemented Interfaces:
EntryWeigher<K,V>
,java.io.Serializable
- Enclosing class:
- Weighers
static final class Weighers.EntryWeigherView<K,V> extends java.lang.Object implements EntryWeigher<K,V>, java.io.Serializable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static long
serialVersionUID
(package private) Weigher<? super V>
weigher
-
Constructor Summary
Constructors Constructor Description EntryWeigherView(Weigher<? super V> weigher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
weightOf(K key, V value)
Measures an entry's weight to determine how many units of capacity that the key and value consumes.
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
weightOf
public int weightOf(K key, V value)
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
-
-