Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for ConstantWeigher (0.09 sec)

  1. android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

     * limitations under the License.
     */
    
    package com.google.common.cache;
    
    import static com.google.common.cache.CacheBuilderSpec.parse;
    import static com.google.common.cache.TestingWeighers.constantWeigher;
    import static java.util.concurrent.TimeUnit.DAYS;
    import static java.util.concurrent.TimeUnit.HOURS;
    import static java.util.concurrent.TimeUnit.MINUTES;
    import static java.util.concurrent.TimeUnit.SECONDS;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  2. 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();
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 2K bytes
    - Viewed (0)
  3. 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;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 15K bytes
    - Viewed (0)
  4. 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(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 25.1K bytes
    - Viewed (0)
  5. 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(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 25K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

     * limitations under the License.
     */
    
    package com.google.common.cache;
    
    import static com.google.common.cache.CacheBuilderSpec.parse;
    import static com.google.common.cache.TestingWeighers.constantWeigher;
    import static java.util.concurrent.TimeUnit.DAYS;
    import static java.util.concurrent.TimeUnit.HOURS;
    import static java.util.concurrent.TimeUnit.MINUTES;
    import static java.util.concurrent.TimeUnit.SECONDS;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

    import static com.google.common.cache.TestingRemovalListeners.countingRemovalListener;
    import static com.google.common.cache.TestingRemovalListeners.queuingRemovalListener;
    import static com.google.common.cache.TestingWeighers.constantWeigher;
    import static com.google.common.collect.Maps.immutableEntry;
    import static com.google.common.truth.Truth.assertThat;
    import static com.google.common.util.concurrent.MoreExecutors.listeningDecorator;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 110.5K bytes
    - Viewed (0)
Back to top