JavaScript is disabled on your browser.
Skip navigation links
Overview
Class
Use
Tree
Deprecated
Index
Search
Help
com.google.common.cache
Weigher
Contents
Hide sidebar
❮
❯
Show sidebar
Description
Method Summary
Method Details
weigh(K, V)
Interface Weigher<K,
V>
@GwtCompatible
public interface
Weigher
<K,
V>
Calculates the weights of cache entries.
Since:
11.0
Author:
Charles Fry
Method Summary
All Methods
Instance Methods
Abstract Methods
Modifier and Type
Method
Description
int
weigh
(
K
key,
V
value)
Returns the weight of a cache entry.
Method Details
weigh
int
weigh
(
K
key,
V
value)
Returns the weight of a cache entry. There is no unit for entry weights; rather they are simply relative to each other.
Returns:
the weight of the entry; must be non-negative