Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 44 for replace (0.14 sec)

  1. guava-tests/test/com/google/common/collect/ForwardingConcurrentMapTest.java

        assertEquals(Integer.valueOf(1), map.replace("foo", 2));
        assertNull(map.replace("bar", 3));
        assertEquals(Integer.valueOf(2), map.get("foo"));
        assertFalse(map.containsKey("bar"));
      }
    
      public void testReplaceConditional() {
        TestMap map = new TestMap();
        map.put("foo", 1);
        assertFalse(map.replace("foo", 2, 3));
        assertFalse(map.replace("bar", 1, 2));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/cache/RemovalCause.java

      },
    
      /**
       * The entry itself was not actually removed, but its value was replaced by the user. This can
       * result from the user invoking {@link Cache#put}, {@link LoadingCache#refresh}, {@link Map#put},
       * {@link Map#putAll}, {@link ConcurrentMap#replace(Object, Object)}, or {@link
       * ConcurrentMap#replace(Object, Object, Object)}.
       */
      REPLACED {
        @Override
        boolean wasEvicted() {
          return false;
        }
      },
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 2.7K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/testing/RelationshipTester.java

        if (!condition) {
          throw new AssertionFailedError(
              template
                  .replace("$RELATIONSHIP", relationshipName)
                  .replace("$HASH", hashName)
                  .replace("$ITEM", itemReporter.reportItem(item))
                  .replace("$OTHER", itemReporter.reportItem(other)));
        }
      }
    
      private Item<T> getItem(int groupNumber, int itemNumber) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Apr 25 11:57:12 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/testers/ConcurrentMapReplaceEntryTester.java

      public void testReplaceEntry_supportedPresent() {
        assertTrue(getMap().replace(k0(), v0(), v3()));
        expectReplacement(entry(k0(), v3()));
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
      @CollectionSize.Require(absent = ZERO)
      public void testReplaceEntry_supportedPresentUnchanged() {
        assertTrue(getMap().replace(k0(), v0(), v0()));
        expectUnchanged();
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/testers/MapReplaceTester.java

        try {
          assertEquals(v0(), getMap().replace(k0(), v3()));
          expectReplacement(entry(k0(), v3()));
        } catch (ClassCastException tolerated) { // for ClassToInstanceMap
          expectUnchanged();
        }
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
      @CollectionSize.Require(absent = ZERO)
      public void testReplace_supportedPresentNoChange() {
        assertEquals(v0(), getMap().replace(k0(), v0()));
        expectUnchanged();
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 3.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ForwardingConcurrentMap.java

        return delegate().remove(key, value);
      }
    
      @CanIgnoreReturnValue
      @Override
      @CheckForNull
      public V replace(K key, V value) {
        return delegate().replace(key, value);
      }
    
      @CanIgnoreReturnValue
      @Override
      public boolean replace(K key, V oldValue, V newValue) {
        return delegate().replace(key, oldValue, newValue);
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 29 19:42:21 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/testers/ConcurrentMapReplaceEntryTester.java

      public void testReplaceEntry_supportedPresent() {
        assertTrue(getMap().replace(k0(), v0(), v3()));
        expectReplacement(entry(k0(), v3()));
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
      @CollectionSize.Require(absent = ZERO)
      public void testReplaceEntry_supportedPresentUnchanged() {
        assertTrue(getMap().replace(k0(), v0(), v0()));
        expectUnchanged();
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/AbstractCollectionTester.java

    @ElementTypesAreNonnullByDefault
    public abstract class AbstractCollectionTester<E extends @Nullable Object>
        extends AbstractContainerTester<Collection<E>, E> {
    
      // TODO: replace this with an accessor.
      protected Collection<E> collection;
    
      @Override
      protected Collection<E> actualContents() {
        return collection;
      }
    
      // TODO: dispose of this once collection is encapsulated.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  9. guava/src/com/google/common/cache/RemovalCause.java

      },
    
      /**
       * The entry itself was not actually removed, but its value was replaced by the user. This can
       * result from the user invoking {@link Cache#put}, {@link LoadingCache#refresh}, {@link Map#put},
       * {@link Map#putAll}, {@link ConcurrentMap#replace(Object, Object)}, or {@link
       * ConcurrentMap#replace(Object, Object, Object)}.
       */
      REPLACED {
        @Override
        boolean wasEvicted() {
          return false;
        }
      },
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 2.7K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/testers/ConcurrentMapReplaceTester.java

      public void testReplace_supportedPresent() {
        assertEquals(v0(), getMap().replace(k0(), v3()));
        expectReplacement(entry(k0(), v3()));
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
      @CollectionSize.Require(absent = ZERO)
      public void testReplace_supportedPresentNoChange() {
        assertEquals(v0(), getMap().replace(k0(), v0()));
        expectUnchanged();
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.8K bytes
    - Viewed (0)
Back to top