Top Fields Constructors Methods
com.github.benmanes.caffeine.cache

pack-priv final Class BoundedWeigher<K, V>

Located in compilation unit of com.github.benmanes.caffeine.cache.Weigher.

extends Object
implements Weigher<K, V>, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, com.github.benmanes.caffeine.cache.Weigher

Field Summary

Modifier and TypeField and Description
pack-priv final Weigher<? super K, ? super V>
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv
BoundedWeigher(Weigher<? super K, ? super V> delegate)

Method Summary

Modifier and TypeMethod and Description
public int
weigh(K
the key to weigh
key
,
V
the value to weigh
value
)

Implements com.github.benmanes.caffeine.cache.Weigher.weigh.

Returns the weight of a cache entry.
pack-priv Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
pack-priv final Weigher<? super K, ? super V> delegate
Annotations
@SuppressWarnings:serial
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

BoundedWeigherback to summary
pack-priv BoundedWeigher(Weigher<? super K, ? super V> delegate)

Method Detail

weighback to summary
public int weigh(K key, V value)

Implements com.github.benmanes.caffeine.cache.Weigher.weigh.

Doc from com.github.benmanes.caffeine.cache.Weigher.weigh.

Returns the weight of a cache entry. There is no unit for entry weights; rather they are simply relative to each other.

Parameters
key:K

the key to weigh

value:V

the value to weigh

Returns:int

the weight of the entry; must be non-negative

Annotations
@Override
writeReplaceback to summary
pack-priv Object writeReplace()