Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 6,029 for Weigher (0.09 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

      }
    
      @GwtIncompatible // weigher
      public void testWeigher_withoutMaximumWeight() {
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().weigher(constantWeigher(42));
        assertThrows(IllegalStateException.class, () -> builder.build(identityLoader()));
      }
    
      @GwtIncompatible // weigher
      public void testWeigher_withMaximumSize() {
        assertThrows(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  9. guava/src/com/google/common/cache/LocalCache.java

      /** Strategy for referencing values. */
      final Strength valueStrength;
    
      /** The maximum weight of this map. UNSET_INT if there is no maximum. */
      final long maxWeight;
    
      /** Weigher to weigh cache entries. */
      final Weigher<K, V> weigher;
    
      /** How long after the last access to an entry the map will retain that entry. */
      final long expireAfterAccessNanos;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 149.2K bytes
    - Viewed (0)
  10. compat/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java

        }
    
        public static String key(String groupId, String artifactId, String version) {
            notBlank(groupId, "groupId can neither be null, empty nor blank");
            notBlank(artifactId, "artifactId can neither be null, empty nor blank");
            notBlank(version, "version can neither be null, empty nor blank");
    
            return groupId + ":" + artifactId + ":" + version;
        }
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 6.9K bytes
    - Viewed (0)
Back to top