- Sort Score
- Num 10 results
- Language All
Results 1 - 3 of 3 for constantWeigher (0.05 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
guava-tests/test/com/google/common/cache/TestingWeighers.java
*/ @NullUnmarked public final class TestingWeighers { /** Returns a {@link Weigher} that returns the given {@code constant} for every request. */ 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(); }Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sun Aug 10 19:54:19 GMT 2025 - 2K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/cache/CacheEvictionTest.java
import static com.google.common.cache.TestingCacheLoaders.identityLoader; import static com.google.common.cache.TestingRemovalListeners.countingRemovalListener; import static com.google.common.cache.TestingWeighers.constantWeigher; import static com.google.common.cache.TestingWeighers.intKeyWeigher; import static com.google.common.cache.TestingWeighers.intValueWeigher; import static com.google.common.truth.Truth.assertThat;
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Oct 28 18:19:59 GMT 2025 - 15.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java
assertThrows(IllegalStateException.class, () -> builder.build(identityLoader())); } @GwtIncompatible // weigher public void testWeigher_withMaximumSize() { assertThrows( IllegalStateException.class, () -> CacheBuilder.newBuilder().weigher(constantWeigher(42)).maximumSize(1)); assertThrows(
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Sep 30 22:03:28 GMT 2025 - 25.4K bytes - Click Count (0)