Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 48 for replaceValue (0.07 sec)

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

      }
    
      /**
       * Confirm that replaceValues() returns a List that implements RandomAccess, even though get()
       * doesn't.
       */
      public void testReplaceValuesRandomAccess() {
        Multimap<String, Integer> multimap = create();
        multimap.put("foo", 1);
        multimap.put("foo", 3);
        assertTrue(multimap.replaceValues("foo", asList(2, 4)) instanceof RandomAccess);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 18K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Multimaps.java

       * order. They also specify the behavior of the {@code equals}, {@code hashCode}, and {@code
       * toString} methods for the multimap and its returned views. The multimap's {@code get}, {@code
       * removeAll}, and {@code replaceValues} methods return {@code RandomAccess} lists if the factory
       * does. However, the multimap's {@code get} method returns instances of a different class than
       * does {@code factory.get()}.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 86.3K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/google/UnmodifiableCollectionTests.java

        } catch (UnsupportedOperationException expected) {
        }
        assertMultimapRemainsUnmodified(multimap, originalEntries);
    
        // Test #replaceValues()
        try {
          multimap.replaceValues(sampleKey, sampleValueAsCollection);
          fail("replaceValues succeeded on unmodifiable multimap");
        } catch (UnsupportedOperationException expected) {
        }
        assertMultimapRemainsUnmodified(multimap, originalEntries);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/LinkedListMultimap.java

     * {@link #replaceValues} attempts to preserve iteration order as much as possible.
     *
     * <p>The collections returned by {@link #keySet()} and {@link #asMap} iterate through the keys in
     * the order they were first added to the multimap. Similarly, {@link #get}, {@link #removeAll}, and
     * {@link #replaceValues} return collections that iterate through the values in the order they were
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 13 14:11:58 UTC 2023
    - 27.5K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/google/SetMultimapPutTester.java

    import com.google.common.collect.testing.features.MapFeature;
    import java.util.List;
    import java.util.Map.Entry;
    import java.util.Set;
    import org.junit.Ignore;
    
    /**
     * Tests for {@link SetMultimap#replaceValues}.
     *
     * @author Louis Wasserman
     */
    @GwtCompatible
    @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/AbstractMultimap.java

          changed |= put(entry.getKey(), entry.getValue());
        }
        return changed;
      }
    
      @CanIgnoreReturnValue
      @Override
      public Collection<V> replaceValues(@ParametricNullness K key, Iterable<? extends V> values) {
        checkNotNull(values);
        Collection<V> result = removeAll(key);
        putAll(key, values);
        return result;
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jun 15 21:08:00 UTC 2021
    - 6.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Synchronized.java

          synchronized (mutex) {
            return delegate().putAll(multimap);
          }
        }
    
        @Override
        public Collection<V> replaceValues(@ParametricNullness K key, Iterable<? extends V> values) {
          synchronized (mutex) {
            return delegate().replaceValues(key, values); // copy not synchronized
          }
        }
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 53.4K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/Synchronized.java

          synchronized (mutex) {
            return delegate().putAll(multimap);
          }
        }
    
        @Override
        public Collection<V> replaceValues(@ParametricNullness K key, Iterable<? extends V> values) {
          synchronized (mutex) {
            return delegate().replaceValues(key, values); // copy not synchronized
          }
        }
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 57.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/MultimapsTest.java

            filterKeys(multimap, Predicates.in(ImmutableSet.of("foo", "bar")));
    
        assertEquals(ImmutableSet.of(), filtered.replaceValues("baz", ImmutableSet.<Integer>of()));
    
        assertThrows(
            IllegalArgumentException.class, () -> filtered.replaceValues("baz", ImmutableSet.of(5)));
      }
    
      public void testFilteredKeysSetMultimapGetBadValue() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 38.4K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/AbstractMultimap.java

          changed |= put(entry.getKey(), entry.getValue());
        }
        return changed;
      }
    
      @CanIgnoreReturnValue
      @Override
      public Collection<V> replaceValues(@ParametricNullness K key, Iterable<? extends V> values) {
        checkNotNull(values);
        Collection<V> result = removeAll(key);
        putAll(key, values);
        return result;
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jun 15 21:08:00 UTC 2021
    - 7.1K bytes
    - Viewed (0)
Back to top