- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for HashBiMap (0.11 sec)
-
guava-tests/test/com/google/common/collect/HashBiMapTest.java
"chile", "peso", "switzerland", "franc"); HashBiMap<String, String> bimap = HashBiMap.create(map); assertEquals("dollar", bimap.get("canada")); assertEquals("canada", bimap.inverse().get("dollar")); } private static final int N = 1000; public void testBashIt() throws Exception { BiMap<Integer, Integer> bimap = HashBiMap.create(N); BiMap<Integer, Integer> inverse = bimap.inverse();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 8.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/EnumHashBiMapTest.java
} public void testCreate() { EnumHashBiMap<Currency, String> bimap = EnumHashBiMap.create(Currency.class); assertTrue(bimap.isEmpty()); assertEquals("{}", bimap.toString()); assertEquals(HashBiMap.create(), bimap); bimap.put(Currency.DOLLAR, "dollar"); assertEquals("dollar", bimap.get(Currency.DOLLAR)); assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar")); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 8.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/BenchmarkHelpers.java
} }; } enum BiMapImpl implements MapsImplEnum { HashBiMapImpl { @Override 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); } };
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 12.4K bytes - Viewed (0) -
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-tests/test/com/google/common/collect/BenchmarkHelpers.java
} }; } enum BiMapImpl implements MapsImplEnum { HashBiMapImpl { @Override 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); } };
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/src/com/google/common/collect/Maps.java
* <p>It is imperative that the user manually synchronize on the returned map when accessing any * of its collection views: * * <pre>{@code * BiMap<Long, String> map = Maps.synchronizedBiMap( * HashBiMap.<Long, String>create()); * ... * Set<Long> set = map.keySet(); // Needn't be in synchronized block * ... * synchronized (map) { // Synchronizing on map, not set!
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 161.6K bytes - Viewed (0) -
guava/src/com/google/common/collect/Maps.java
* <p>It is imperative that the user manually synchronize on the returned map when accessing any * of its collection views: * * <pre>{@code * BiMap<Long, String> map = Maps.synchronizedBiMap( * HashBiMap.<Long, String>create()); * ... * Set<Long> set = map.keySet(); // Needn't be in synchronized block * ... * synchronized (map) { // Synchronizing on map, not set!
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 167.4K bytes - Viewed (0)