- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 8,361 for Weigher (0.07 sec)
-
guava/src/com/google/common/cache/Weigher.java
/** * Calculates the weights of cache entries. * * @author Charles Fry * @since 11.0 */ @GwtCompatible @FunctionalInterface @ElementTypesAreNonnullByDefault public interface Weigher<K, V> { /** * Returns the weight of a cache entry. There is no unit for entry weights; rather they are simply * relative to each other. * * @return the weight of the entry; must be non-negative */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jun 15 18:00:07 UTC 2021 - 1.1K bytes - Viewed (0) -
android/guava/src/com/google/common/cache/Weigher.java
/** * Calculates the weights of cache entries. * * @author Charles Fry * @since 11.0 */ @GwtCompatible @ElementTypesAreNonnullByDefault public interface Weigher<K, V> { /** * Returns the weight of a cache entry. There is no unit for entry weights; rather they are simply * relative to each other. * * @return the weight of the entry; must be non-negative */ int weigh(K key, V value);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jun 15 18:00:07 UTC 2021 - 1.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheEvictionTest.java
IdentityLoader<Integer> loader = identityLoader(); // Even numbers are free, odd are too expensive Weigher<Integer, Integer> evensOnly = new Weigher<Integer, Integer>() { @Override public int weigh(Integer k, Integer v) { return k % 2; } };
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 15K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/TestingWeighers.java
static Weigher<Object, Object> constantWeigher(int constant) { return new ConstantWeigher(constant); } /** Returns a {@link Weigher} that uses the integer key as the weight. */ static Weigher<Integer, Object> intKeyWeigher() { return new IntKeyWeigher(); } /** Returns a {@link Weigher} that uses the integer value as the weight. */ static Weigher<Object, Integer> intValueWeigher() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 1.9K bytes - Viewed (0) -
android/guava/src/com/google/common/cache/CacheBuilder.java
@CanIgnoreReturnValue // TODO(b/27479612): consider removing this public <K1 extends K, V1 extends V> CacheBuilder<K1, V1> weigher( Weigher<? super K1, ? super V1> weigher) { checkState(this.weigher == null); if (strictParsing) { checkState( this.maximumSize == UNSET_INT, "weigher can not be combined with maximum size (%s provided)", this.maximumSize); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 52K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java
assertEquals("keyStrength", a.keyStrength, b.keyStrength); assertEquals("removalListener", a.removalListener, b.removalListener); assertEquals("weigher", a.weigher, b.weigher); assertEquals("valueEquivalence", a.valueEquivalence, b.valueEquivalence); assertEquals("valueStrength", a.valueStrength, b.valueStrength);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 19.1K bytes - Viewed (0) -
guava/src/com/google/common/cache/CacheBuilder.java
@CanIgnoreReturnValue // TODO(b/27479612): consider removing this public <K1 extends K, V1 extends V> CacheBuilder<K1, V1> weigher( Weigher<? super K1, ? super V1> weigher) { checkState(this.weigher == null); if (strictParsing) { checkState( this.maximumSize == UNSET_INT, "weigher can not be combined with maximum size (%s provided)", this.maximumSize); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 51.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/LocalCacheTest.java
} public void testSetWeigher() { Weigher<Object, Object> testWeigher = new Weigher<Object, Object>() { @Override public int weigh(Object key, Object value) { return 42; } }; LocalCache<Object, Object> map = makeLocalCache(createCacheBuilder().maximumWeight(1).weigher(testWeigher)); assertSame(testWeigher, map.weigher); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 110.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/LocalCacheTest.java
} public void testSetWeigher() { Weigher<Object, Object> testWeigher = new Weigher<Object, Object>() { @Override public int weigh(Object key, Object value) { return 42; } }; LocalCache<Object, Object> map = makeLocalCache(createCacheBuilder().maximumWeight(1).weigher(testWeigher)); assertSame(testWeigher, map.weigher); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 112.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java
assertEquals("keyStrength", a.keyStrength, b.keyStrength); assertEquals("removalListener", a.removalListener, b.removalListener); assertEquals("weigher", a.weigher, b.weigher); assertEquals("valueEquivalence", a.valueEquivalence, b.valueEquivalence); assertEquals("valueStrength", a.valueStrength, b.valueStrength);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 19.1K bytes - Viewed (0)