MCPcopy
hub / github.com/google/guava / Weigher

Interface Weigher

guava/src/com/google/common/cache/Weigher.java:25–36  ·  guava/src/com/google/common/cache/Weigher.java::Weigher

Calculates the weights of cache entries. @author Charles Fry @since 11.0

Source from the content-addressed store, hash-verified

23 * @since 11.0
24 */
25@GwtCompatible
26@FunctionalInterface
27public interface Weigher<K, V> {
28
29 /**
30 * Returns the weight of a cache entry. There is no unit for entry weights; rather they are simply
31 * relative to each other.
32 *
33 * @return the weight of the entry; must be non-negative
34 */
35 int weigh(K key, V value);
36}

Callers

nothing calls this directly

Implementers 8

ConstantWeigherguava-tests/test/com/google/common/cac
IntKeyWeigherguava-tests/test/com/google/common/cac
IntValueWeigherguava-tests/test/com/google/common/cac
SerializableWeigherguava-tests/test/com/google/common/cac
ConstantWeigherandroid/guava-tests/test/com/google/co
IntKeyWeigherandroid/guava-tests/test/com/google/co
IntValueWeigherandroid/guava-tests/test/com/google/co
SerializableWeigherandroid/guava-tests/test/com/google/co

Calls

no outgoing calls

Tested by

no test coverage detected