- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for ImmutableBiMap (0.08 sec)
-
android/guava/src/com/google/common/collect/ImmutableBiMap.java
* @throws NullPointerException if any key or value in {@code map} is null */ public static <K, V> ImmutableBiMap<K, V> copyOf(Map<? extends K, ? extends V> map) { if (map instanceof ImmutableBiMap) { @SuppressWarnings("unchecked") // safe since map is not writable ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map; // TODO(lowasser): if we need to make a copy of a BiMap because the
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 21:21:17 UTC 2024 - 22.2K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableBiMap.java
* @throws NullPointerException if any key or value in {@code map} is null */ public static <K, V> ImmutableBiMap<K, V> copyOf(Map<? extends K, ? extends V> map) { if (map instanceof ImmutableBiMap) { @SuppressWarnings("unchecked") // safe since map is not writable ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map; // TODO(lowasser): if we need to make a copy of a BiMap because the
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 22.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ImmutableBiMapTest.java
} public void testOf() { assertMapEquals(ImmutableBiMap.of("one", 1), "one", 1); assertMapEquals(ImmutableBiMap.of("one", 1).inverse(), 1, "one"); assertMapEquals(ImmutableBiMap.of("one", 1, "two", 2), "one", 1, "two", 2); assertMapEquals(ImmutableBiMap.of("one", 1, "two", 2).inverse(), 1, "one", 2, "two"); assertMapEquals( ImmutableBiMap.of("one", 1, "two", 2, "three", 3), "one", 1, "two", 2, "three", 3);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 22.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/RegularImmutableBiMap.java
@LazyInit @RetainedWith @CheckForNull private transient ImmutableBiMap<V, K> inverse; @Override public ImmutableBiMap<V, K> inverse() { if (isEmpty()) { return ImmutableBiMap.of(); } ImmutableBiMap<V, K> result = inverse; return (result == null) ? inverse = new Inverse() : result; } private final class Inverse extends ImmutableBiMap<V, K> { @Override public int size() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 11.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/SingletonImmutableBiMap.java
} @CheckForNull private final transient ImmutableBiMap<V, K> inverse; @LazyInit @RetainedWith @CheckForNull private transient ImmutableBiMap<V, K> lazyInverse; @Override public ImmutableBiMap<V, K> inverse() { if (inverse != null) { return inverse; } else { // racy single-check idiom ImmutableBiMap<V, K> result = lazyInverse; if (result == null) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 3.6K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/BiMapGenerators.java
public static class ImmutableBiMapGenerator extends TestStringBiMapGenerator { @Override protected BiMap<String, String> create(Entry<String, String>[] entries) { ImmutableBiMap.Builder<String, String> builder = ImmutableBiMap.builder(); for (Entry<String, String> entry : entries) { checkNotNull(entry); builder.put(entry.getKey(), entry.getValue()); } return builder.build(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 2.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ImmutableBiMapFloodingTest.java
} } return ImmutableBiMap.copyOf(sourceMap); } }, COPY_OF_ENTRIES { @Override public ImmutableBiMap<Object, Object> create(List<Entry<?, ?>> entries) { return ImmutableBiMap.copyOf(entries); } }, BUILDER_PUT_ONE_BY_ONE { @Override public ImmutableBiMap<Object, Object> create(List<Entry<?, ?>> entries) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 4.2K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/BiMapGenerators.java
public static class ImmutableBiMapGenerator extends TestStringBiMapGenerator { @Override protected BiMap<String, String> create(Entry<String, String>[] entries) { ImmutableBiMap.Builder<String, String> builder = ImmutableBiMap.builder(); for (Entry<String, String> entry : entries) { checkNotNull(entry); builder.put(entry.getKey(), entry.getValue()); } return builder.build(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 2.3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 20.8K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/CollectCollectors.java
} static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableBiMap<K, V>> toImmutableBiMap( Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) { checkNotNull(keyFunction); checkNotNull(valueFunction); return Collector.of( ImmutableBiMap.Builder<K, V>::new,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 17.1K bytes - Viewed (0)