Additional top-level classes in compilation unit: SingletonWeigher, BoundedWeigher.
| Modifier and Type | Method and Description |
|---|---|
| public static < the type of keys K, the type of values V> Weigher | Returns: a weigher that enforces that the weight is non-negativethe weigher to weighs the entry delegate)Returns a weigher that enforces that the weight is non-negative. |
| public static < the type of keys K, the type of values V> Weigher | Returns: a weigher where an entry has a weight of1Returns a weigher where an entry has a weight of |
| public @NonNegative int | Returns: the weight of the entry; must be non-negativethe key to weigh key, V the value to weigh value)Returns the weight of a cache entry. |
| boundedWeigher | back to summary |
|---|---|
| public static <K, V> Weigher Returns a weigher that enforces that the weight is non-negative. | |
| singletonWeigher | back to summary |
|---|---|
| public static <K, V> Weigher Returns a weigher where an entry has a weight of
| |
| weigh | back to summary |
|---|---|
| public @NonNegative 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.
| |