Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for forcePut (0.2 sec)

  1. android/guava-testlib/src/com/google/common/collect/testing/google/BiMapPutTester.java

        getMap().forcePut(k1(), v0());
        expectContents(Helpers.mapEntry(k1(), v0()));
        assertEquals(k1(), getMap().inverse().get(v0()));
        assertEquals(1, getMap().size());
        assertFalse(getMap().containsKey(k0()));
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
      @CollectionSize.Require(SEVERAL)
      public void testForcePutKeyAndValuePresent() {
        getMap().forcePut(k0(), v1());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/SynchronizedBiMapTest.java

        public TestBiMap(BiMap<K, V> delegate, Object mutex) {
          super(delegate, mutex);
          this.delegate = delegate;
        }
    
        @Override
        public @Nullable V forcePut(K key, V value) {
          assertTrue(Thread.holdsLock(mutex));
          return delegate.forcePut(key, value);
        }
    
        @Override
        public BiMap<V, K> inverse() {
          assertTrue(Thread.holdsLock(mutex));
          return delegate.inverse();
        }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/BiMap.java

       *     previous entry. (If the bimap contains null values, then {@code forcePut}, like {@code
       *     put}, returns {@code null} both if the key is absent and if it is present with a null
       *     value.)
       */
      @CanIgnoreReturnValue
      @CheckForNull
      V forcePut(@ParametricNullness K key, @ParametricNullness V value);
    
      // Bulk Operations
    
      /**
       * {@inheritDoc}
       *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Sat Jun 17 14:40:53 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/SynchronizedBiMapTest.java

        public TestBiMap(BiMap<K, V> delegate, Object mutex) {
          super(delegate, mutex);
          this.delegate = delegate;
        }
    
        @Override
        public @Nullable V forcePut(K key, V value) {
          assertTrue(Thread.holdsLock(mutex));
          return delegate.forcePut(key, value);
        }
    
        @Override
        public BiMap<V, K> inverse() {
          assertTrue(Thread.holdsLock(mutex));
          return delegate.inverse();
        }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/google/BiMapPutTester.java

        getMap().forcePut(k1(), v0());
        expectContents(Helpers.mapEntry(k1(), v0()));
        assertEquals(k1(), getMap().inverse().get(v0()));
        assertEquals(1, getMap().size());
        assertFalse(getMap().containsKey(k0()));
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
      @CollectionSize.Require(SEVERAL)
      public void testForcePutKeyAndValuePresent() {
        getMap().forcePut(k0(), v1());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/EnumHashBiMap.java

      // TODO(b/192446998): Remove this override after tools understand nullness better.
      @CheckForNull
      public V forcePut(K key, @ParametricNullness V value) {
        return super.forcePut(key, value);
      }
    
      /** Returns the associated key type. */
      @GwtIncompatible
      public Class<K> keyType() {
        return keyTypeOrObjectUnderJ2cl;
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Aug 24 01:40:03 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/EnumHashBiMap.java

      // TODO(b/192446998): Remove this override after tools understand nullness better.
      @CheckForNull
      public V forcePut(K key, @ParametricNullness V value) {
        return super.forcePut(key, value);
      }
    
      /** Returns the associated key type. */
      @GwtIncompatible
      public Class<K> keyType() {
        return keyTypeOrObjectUnderJ2cl;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Aug 24 01:40:03 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/HashBiMapTest.java

      }
    
      public void testInsertionOrderAfterForcePut() {
        BiMap<String, Integer> map = HashBiMap.create();
        map.put("foo", 1);
        map.put("bar", 2);
        map.put("quux", 3);
    
        map.forcePut("quux", 1);
        assertThat(map.entrySet())
            .containsExactly(Maps.immutableEntry("bar", 2), Maps.immutableEntry("quux", 1))
            .inOrder();
      }
    
      public void testInsertionOrderAfterInverseForcePut() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/HashBiMapTest.java

      }
    
      public void testInsertionOrderAfterForcePut() {
        BiMap<String, Integer> map = HashBiMap.create();
        map.put("foo", 1);
        map.put("bar", 2);
        map.put("quux", 3);
    
        map.forcePut("quux", 1);
        assertThat(map.entrySet())
            .containsExactly(Maps.immutableEntry("bar", 2), Maps.immutableEntry("quux", 1))
            .inOrder();
      }
    
      public void testInsertionOrderAfterInverseForcePut() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/BiMap.java

       *     previous entry. (If the bimap contains null values, then {@code forcePut}, like {@code
       *     put}, returns {@code null} both if the key is absent and if it is present with a null
       *     value.)
       */
      @CanIgnoreReturnValue
      @CheckForNull
      V forcePut(@ParametricNullness K key, @ParametricNullness V value);
    
      // Bulk Operations
    
      /**
       * {@inheritDoc}
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sat Jun 17 14:40:53 GMT 2023
    - 4.3K bytes
    - Viewed (0)
Back to top