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

pack-priv final Enum SingletonWeigher

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

extends Enum<SingletonWeigher>
implements Weigher<Object, Object>
Class Inheritance
All Implemented Interfaces
com.github.benmanes.caffeine.cache.Weigher

Field Summary

Modifier and TypeField and Description
public static final SingletonWeigher

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static SingletonWeigher
public static SingletonWeigher[]
public int
weigh(Object
the key to weigh
key
,
Object
the value to weigh
value
)

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

Returns the weight of a cache entry.
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INSTANCEback to summary
public static final SingletonWeigher INSTANCE

Constructor Detail

SingletonWeigherback to summary
private SingletonWeigher()

Method Detail

valueOfback to summary
public static SingletonWeigher valueOf(String name)
valuesback to summary
public static SingletonWeigher[] values()
weighback to summary
public int weigh(Object key, Object 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:Object

the key to weigh

value:Object

the value to weigh

Returns:int

the weight of the entry; must be non-negative

Annotations
@Override