Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for ImmutableMap (0.08 sec)

  1. android/guava/src/com/google/common/collect/ImmutableMap.java

       * @throws NullPointerException if any key or value in {@code map} is null
       */
      public static <K, V> ImmutableMap<K, V> copyOf(Map<? extends K, ? extends V> map) {
        if ((map instanceof ImmutableMap) && !(map instanceof SortedMap)) {
          @SuppressWarnings("unchecked") // safe since map is not writable
          ImmutableMap<K, V> kvMap = (ImmutableMap<K, V>) map;
          if (!kvMap.isPartialView()) {
            return kvMap;
          }
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/ImmutableMap.java

         * java.util.LinkedHashMap LinkedHashMap} and {@link ImmutableMap#copyOf(Map)} rather than
         * {@code ImmutableMap.Builder}.
         *
         * @since 31.1
         */
        public ImmutableMap<K, V> buildKeepingLast() {
          return build(false);
        }
    
        @VisibleForTesting // only for testing JDK backed implementation
        ImmutableMap<K, V> buildJdkBacked() {
          checkState(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 44.6K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableSortedMap.java

       * ImmutableSortedMap}.
       *
       * @throws UnsupportedOperationException always
       * @deprecated Use {@link ImmutableSortedMap#toImmutableSortedMap}.
       */
      @DoNotCall("Use toImmutableSortedMap")
      @Deprecated
      public static <T extends @Nullable Object, K, V>
          Collector<T, ?, ImmutableMap<K, V>> toImmutableMap(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 50.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java

        new EqualsTester()
            .addEqualityGroup(
                ImmutableMap.of(),
                ImmutableMap.builder().buildOrThrow(),
                ImmutableMap.ofEntries(),
                map())
            .addEqualityGroup(
                ImmutableMap.of(1, 1),
                ImmutableMap.builder().put(1, 1).buildOrThrow(),
                ImmutableMap.ofEntries(entry(1, 1)),
                map(1, 1))
            .addEqualityGroup(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 36.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/MapsTransformValuesUnmodifiableIteratorTest.java

        Map<String, String> map =
            transformValues(ImmutableMap.<String, Integer>of(), Functions.toStringFunction());
        assertMapsEqual(Maps.newHashMap(), map);
      }
    
      public void testTransformSingletonMapEquality() {
        Map<String, String> map =
            transformValues(ImmutableMap.of("a", 1), Functions.toStringFunction());
        Map<String, String> expected = ImmutableMap.of("a", "1");
        assertMapsEqual(expected, map);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/ImmutableMapTest.java

        new EqualsTester()
            .addEqualityGroup(
                ImmutableMap.of(),
                ImmutableMap.builder().buildOrThrow(),
                ImmutableMap.ofEntries(),
                map())
            .addEqualityGroup(
                ImmutableMap.of(1, 1),
                ImmutableMap.builder().put(1, 1).buildOrThrow(),
                ImmutableMap.ofEntries(entry(1, 1)),
                map(1, 1))
            .addEqualityGroup(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/EnumBiMapTest.java

        new EqualsTester()
            .addEqualityGroup(
                EnumBiMap.create(ImmutableMap.of(Currency.DOLLAR, Country.CANADA)),
                EnumBiMap.create(ImmutableMap.of(Currency.DOLLAR, Country.CANADA)))
            .addEqualityGroup(EnumBiMap.create(ImmutableMap.of(Currency.DOLLAR, Country.CHILE)))
            .addEqualityGroup(EnumBiMap.create(ImmutableMap.of(Currency.FRANC, Country.CANADA)))
            .testEquals();
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/AbstractMapsTransformValuesTest.java

        Map<String, String> map =
            transformValues(ImmutableMap.<String, Integer>of(), Functions.toStringFunction());
        assertMapsEqual(Maps.newHashMap(), map);
      }
    
      public void testTransformSingletonMapEquality() {
        Map<String, String> map =
            transformValues(ImmutableMap.of("a", 1), Functions.toStringFunction());
        Map<String, String> expected = ImmutableMap.of("a", "1");
        assertMapsEqual(expected, map);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/google/MapGenerators.java

    public class MapGenerators {
      public static class ImmutableMapGenerator extends TestStringMapGenerator {
        @Override
        protected Map<String, String> create(Entry<String, String>[] entries) {
          ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
          for (Entry<String, String> entry : entries) {
            checkNotNull(entry);
            builder.put(entry.getKey(), entry.getValue());
          }
          return builder.buildOrThrow();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/TreeBasedTableTest.java

        assertEquals(ImmutableMap.of(1, 'a', 3, 'c'), row);
        assertEquals(ImmutableMap.of(3, 'c'), subRow);
        table.remove("foo", 3);
        assertEquals(ImmutableMap.of(1, 'a'), row);
        assertEquals(ImmutableMap.of(), subRow);
        table.remove("foo", 1);
        assertEquals(ImmutableMap.of(), row);
        assertEquals(ImmutableMap.of(), subRow);
        table.put("foo", 2, 'b');
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 15K bytes
    - Viewed (0)
Back to top