- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 65 for ImmutableMap (0.08 sec)
-
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 41.2K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 44.3K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableMap.java
ImmutableMap::copyOf); } @SuppressWarnings("unchecked") // An empty map works for all types. public static <K, V> ImmutableMap<K, V> of() { return (ImmutableMap<K, V>) RegularImmutableMap.EMPTY; } public static <K, V> ImmutableMap<K, V> of(K k1, V v1) { return ImmutableBiMap.of(k1, v1); } public static <K, V> ImmutableMap<K, V> of(K k1, V v1, K k2, V v2) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 18:32:41 UTC 2025 - 16.7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
.put(ImmutableSortedSet.class, ImmutableSortedSet.of()) .put(NavigableSet.class, Sets.unmodifiableNavigableSet(Sets.newTreeSet())) .put(Map.class, ImmutableMap.of()) .put(ImmutableMap.class, ImmutableMap.of()) .put(SortedMap.class, ImmutableSortedMap.of()) .put(ImmutableSortedMap.class, ImmutableSortedMap.of())
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 20.9K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 36.7K bytes - Viewed (0) -
android/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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 15.1K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 11.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/SplitterTest.java
COMMA_SPLITTER .trimResults() .withKeyValueSeparator(Splitter.on(':').trimResults()) .split("boy : tom , girl: tina , cat : kitty , dog: tommy "); ImmutableMap<String, String> expected = ImmutableMap.of("boy", "tom", "girl", "tina", "cat", "kitty", "dog", "tommy"); assertThat(m).isEqualTo(expected); assertThat(m.entrySet()).containsExactlyElementsIn(expected.entrySet()).inOrder(); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 29.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/FunctionsTest.java
@J2ktIncompatible @GwtIncompatible // SerializableTester public void testForMapWithDefaultSerializable() { checkCanReserialize(Functions.forMap(ImmutableMap.of(1, 2), 3)); } public void testForMapWithDefault_null() { ImmutableMap<String, Integer> map = ImmutableMap.of("One", 1); Function<String, @Nullable Integer> function = Functions.forMap(map, null); assertEquals((Integer) 1, function.apply("One"));
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 15.9K bytes - Viewed (0) -
guava/src/com/google/common/collect/RegularImmutableMap.java
* @author Gregory Kick */ @GwtCompatible final class RegularImmutableMap<K, V> extends ImmutableMap<K, V> { @SuppressWarnings("unchecked") static final ImmutableMap<Object, Object> EMPTY = new RegularImmutableMap<>((Entry<Object, Object>[]) ImmutableMap.EMPTY_ENTRY_ARRAY, null, 0); /** * Closed addressing tends to perform well even with high load factors. Being conservative here
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 15.8K bytes - Viewed (0)