Lines Matching defs:ImmutableMap
24 import com.google.common.collect.ImmutableMap.Builder;
61 * Tests for {@link ImmutableMap}.
81 .named("ImmutableMap")
90 .named("ImmutableMap.copyOf")
99 .named("ImmutableMap.copyOf[EnumMap]")
106 .named("ImmutableMap.values, unhashable")
111 .named("ImmutableMap.keySet.asList")
120 .named("ImmutableMap.entrySet.asList")
129 .named("ImmutableMap.values.asList")
173 return ImmutableMap.of();
177 return ImmutableMap.of("one", 1, "two", 2, "three", 3);
192 return ImmutableMap.of("one", 1);
209 ImmutableMap.of("one", 1, "two", 2, "three", 3));
230 return ImmutableMap.of(
246 @GwtIncompatible("GWT's ImmutableMap emulation is backed by java.util.HashMap.")
250 return ImmutableMap.of();
255 return ImmutableMap.of(
268 @GwtIncompatible("GWT's ImmutableMap emulation is backed by java.util.HashMap.")
273 return ImmutableMap.of(0, unhashables.e0);
279 ImmutableMap<String, Integer> map
285 ImmutableMap<String, Integer> map = new Builder<String, Integer>()
292 ImmutableMap<String, Integer> map = new Builder<String, Integer>()
304 ImmutableMap<String, Integer> map = new Builder<String, Integer>()
329 ImmutableMap.Builder<String, Integer> builder =
348 ImmutableMap<String, Integer> map = new Builder<String, Integer>()
363 ImmutableMap<String, Integer> map = new Builder<String, Integer>()
373 ImmutableMap<String, Integer> mapOne = builder
377 ImmutableMap<String, Integer> mapTwo = builder
487 ImmutableMap.of("one", 1),
490 ImmutableMap.of("one", 1, "two", 2),
493 ImmutableMap.of("one", 1, "two", 2, "three", 3),
496 ImmutableMap.of("one", 1, "two", 2, "three", 3, "four", 4),
499 ImmutableMap.of("one", 1, "two", 2, "three", 3, "four", 4, "five", 5),
505 ImmutableMap.of(null, 1);
511 ImmutableMap.of("one", 1, null, 2);
519 ImmutableMap.of("one", null);
525 ImmutableMap.of("one", 1, "two", null);
533 ImmutableMap.of("one", 1, "one", 1);
540 ImmutableMap<String, Integer> copy
541 = ImmutableMap.copyOf(Collections.<String, Integer>emptyMap());
543 assertSame(copy, ImmutableMap.copyOf(copy));
547 ImmutableMap<String, Integer> copy
548 = ImmutableMap.copyOf(Collections.singletonMap("one", 1));
550 assertSame(copy, ImmutableMap.copyOf(copy));
559 ImmutableMap<String, Integer> copy = ImmutableMap.copyOf(original);
561 assertSame(copy, ImmutableMap.copyOf(copy));
566 ImmutableMap<String, Integer> map = ImmutableMap.of("one", 1);
571 ImmutableMap<String, Integer> map = ImmutableMap.of(
579 ImmutableMap<String, Integer> map = ImmutableMap.of();
585 ImmutableMap<String, Integer> map = ImmutableMap.of("one", 1);
595 tester.testAllPublicStaticMethods(ImmutableMap.class);
597 new ImmutableMap.Builder<Object, Object>());
598 tester.testAllPublicInstanceMethods(ImmutableMap.of());
599 tester.testAllPublicInstanceMethods(ImmutableMap.of("one", 1));
601 ImmutableMap.of("one", 1, "two", 2, "three", 3));
635 Map<String, IntHolder> map = ImmutableMap.of("a", holderA, "b", holderB);
639 Map<String, Integer> intMap = ImmutableMap.of("a", 3, "b", 2);
648 assertTrue(ImmutableMap.copyOf(map) instanceof ImmutableEnumMap);
653 Map<String, Integer> map = ImmutableMap.of("one", 1, "two", 2, "three", 3);