- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for BiMap (0.03 sec)
-
guava-tests/test/com/google/common/collect/EnumBiMapTest.java
public void testCreate() { EnumBiMap<Currency, Country> bimap = EnumBiMap.create(Currency.class, Country.class); assertTrue(bimap.isEmpty()); assertEquals("{}", bimap.toString()); assertEquals(HashBiMap.create(), bimap); bimap.put(Currency.DOLLAR, Country.CANADA); assertEquals(Country.CANADA, bimap.get(Currency.DOLLAR)); assertEquals(Currency.DOLLAR, bimap.inverse().get(Country.CANADA)); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 11.8K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/HashBiMap.java
extends AbstractSet<T> { final HashBiMap<K, V> biMap; View(HashBiMap<K, V> biMap) { this.biMap = biMap; } @ParametricNullness abstract T forEntry(int entry); @Override public Iterator<T> iterator() { return new Iterator<T>() { private int index = biMap.firstInInsertionOrder; private int indexToRemove = ABSENT;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Mar 06 16:06:58 UTC 2023 - 36.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ImmutableBiMapTest.java
} // BiMap-specific tests @SuppressWarnings("DoNotCall") public void testForcePut() { BiMap<String, Integer> bimap = ImmutableBiMap.copyOf(ImmutableMap.of("one", 1, "two", 2)); assertThrows(UnsupportedOperationException.class, () -> bimap.forcePut("three", 3)); } public void testKeySet() { ImmutableBiMap<String, Integer> bimap =
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/HashBiMap.java
} @LazyInit @RetainedWith @CheckForNull private transient BiMap<V, K> inverse; @Override public BiMap<V, K> inverse() { BiMap<V, K> result = inverse; return (result == null) ? inverse = new Inverse() : result; } private final class Inverse extends IteratorBasedAbstractMap<V, K> implements BiMap<V, K>, Serializable { BiMap<K, V> forward() { return HashBiMap.this; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 13 14:11:58 UTC 2023 - 24.5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableBiMap.java
ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map; // TODO(lowasser): if we need to make a copy of a BiMap because the // forward map is a view, don't make a copy of the non-view delegate map if (!bimap.isPartialView()) { return bimap; } } return copyOf(map.entrySet()); } /**
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
ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map; // TODO(lowasser): if we need to make a copy of a BiMap because the // forward map is a view, don't make a copy of the non-view delegate map if (!bimap.isPartialView()) { return bimap; } } return copyOf(map.entrySet()); } /**
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/src/com/google/common/collect/AbstractBiMap.java
super(backward, forward); } /* * Serialization stores the forward bimap, the inverse of this inverse. * Deserialization calls inverse() on the forward bimap and returns that * inverse. * * If a bimap and its inverse are serialized together, the deserialized * instances have inverse() methods that return the other. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Aug 24 01:40:03 UTC 2023 - 14.6K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/FreshValueGeneratorTest.java
public void testSetMultimap() { assertFreshInstance(new TypeToken<SetMultimap<String, ?>>() {}); } public void testBiMap() { assertFreshInstance(new TypeToken<BiMap<String, ?>>() {}); assertNotInstantiable(new TypeToken<BiMap<EmptyEnum, String>>() {}); } public void testHashBiMap() { assertFreshInstance(new TypeToken<HashBiMap<String, ?>>() {}); } public void testTable() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 17.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/BenchmarkHelpers.java
public <K extends Comparable<K>, V> BiMap<K, V> create(Map<K, V> map) { return HashBiMap.create(map); } }, ImmutableBiMapImpl { @Override public <K extends Comparable<K>, V> BiMap<K, V> create(Map<K, V> map) { return ImmutableBiMap.copyOf(map); } }; @Override public abstract <K extends Comparable<K>, V> BiMap<K, V> create(Map<K, V> map); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 12.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/BenchmarkHelpers.java
public <K extends Comparable<K>, V> BiMap<K, V> create(Map<K, V> map) { return HashBiMap.create(map); } }, ImmutableBiMapImpl { @Override public <K extends Comparable<K>, V> BiMap<K, V> create(Map<K, V> map) { return ImmutableBiMap.copyOf(map); } }; @Override public abstract <K extends Comparable<K>, V> BiMap<K, V> create(Map<K, V> map); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 12.4K bytes - Viewed (0)