Package com.google.common.cache
Interface Weigher<K,V>
- All Known Implementing Classes:
CacheBuilder.OneWeigher
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Calculates the weights of cache entries.
- Since:
- 11.0
-
Method Summary
-
Method Details
-
weigh
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
-