Searched refs:bimap (Results 1 - 25 of 30) sorted by relevance

12

/external/guava/guava-tests/test/com/google/common/collect/
H A DAbstractBiMapTest.java44 protected BiMap<Integer, String> bimap; field in class:AbstractBiMapTest
50 bimap = create();
51 entrySet = bimap.entrySet();
55 bimap.clear();
56 assertTrue(bimap.isEmpty());
58 bimap.clear();
59 assertTrue(bimap.isEmpty());
63 assertFalse(bimap.containsKey(null));
64 assertFalse(bimap.containsKey(1));
65 assertFalse(bimap
[all...]
H A DHashBiMapTest.java40 BiMap<String, String> bimap = HashBiMap.create();
41 assertEquals(0, bimap.size());
42 bimap.put("canada", "dollar");
43 assertEquals("dollar", bimap.get("canada"));
44 assertEquals("canada", bimap.inverse().get("dollar"));
53 HashBiMap<String, String> bimap = HashBiMap.create(map);
54 assertEquals("dollar", bimap.get("canada"));
55 assertEquals("canada", bimap.inverse().get("dollar"));
61 BiMap<Integer, Integer> bimap = HashBiMap.create(N);
62 BiMap<Integer, Integer> inverse = bimap
[all...]
H A DEnumHashBiMapTest.java40 EnumHashBiMap<Currency, String> bimap =
42 assertTrue(bimap.isEmpty());
43 assertEquals("{}", bimap.toString());
44 assertEquals(HashBiMap.create(), bimap);
45 bimap.put(Currency.DOLLAR, "dollar");
46 assertEquals("dollar", bimap.get(Currency.DOLLAR));
47 assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar"));
56 EnumHashBiMap<Currency, String> bimap
58 assertEquals("dollar", bimap.get(Currency.DOLLAR));
59 assertEquals(Currency.DOLLAR, bimap
[all...]
H A DEnumBiMapTest.java43 EnumBiMap<Currency, Country> bimap =
45 assertTrue(bimap.isEmpty());
46 assertEquals("{}", bimap.toString());
47 assertEquals(HashBiMap.create(), bimap);
48 bimap.put(Currency.DOLLAR, Country.CANADA);
49 assertEquals(Country.CANADA, bimap.get(Currency.DOLLAR));
50 assertEquals(Currency.DOLLAR, bimap.inverse().get(Country.CANADA));
59 EnumBiMap<Currency, Country> bimap = EnumBiMap.create(map);
60 assertEquals(Country.CANADA, bimap.get(Currency.DOLLAR));
61 assertEquals(Currency.DOLLAR, bimap
[all...]
H A DBiMapMapInterfaceTest.java62 BiMap<String, Integer> bimap = (BiMap<String, Integer>) map;
63 BiMap<Integer, String> inverse = bimap.inverse();
64 assertEquals(bimap.size(), inverse.size());
65 for (Entry<String, Integer> entry : bimap.entrySet()) {
69 assertEquals(entry.getKey(), bimap.get(entry.getValue()));
102 BiMap<String, Integer> bimap = HashBiMap.create();
103 bimap.put("foo", 1);
104 bimap.put("bar", 2);
105 return Maps.unmodifiableBiMap(bimap);
H A DBiMapCollectionTest.java43 BiMap<String, Integer> bimap = HashBiMap.create();
45 bimap.put(elements[i], i);
47 return bimap.keySet();
58 BiMap<Integer, String> bimap = HashBiMap.create();
60 bimap.put(i, elements[i]);
62 return bimap.values();
H A DImmutableBiMapTest.java157 BiMap<K, V> bimap = (BiMap<K, V>) map;
162 assertEquals(entry.getKey(), bimap.inverse().get(entry.getValue()));
441 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.of();
442 assertEquals(Collections.<String, Integer>emptyMap(), bimap);
443 assertEquals(Collections.<String, Integer>emptyMap(), bimap.inverse());
450 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf(
452 assertMapEquals(bimap, "one", 1, "two", 2);
453 assertMapEquals(bimap.inverse(), 1, "one", 2, "two");
457 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf(
465 assertMapEquals(bimap,
[all...]
H A DSynchronizedBiMapTest.java79 BiMap<String, Integer> bimap = create();
80 BiMap<Integer, String> inverse = bimap.inverse();
81 assertSame(bimap, inverse.inverse());
104 * If you serialize a synchronized bimap and its inverse together, the
109 * To make them the same, the inverse synchronized bimap would need a custom
H A DMapsTest.java908 BiMap<String, Integer> bimap = HashBiMap.create();
909 bimap.put("one", 1);
910 BiMap<String, Integer> sync = Maps.synchronizedBiMap(bimap);
911 bimap.put("two", 2);
913 assertEquals(ImmutableSet.of(1, 2, 3), bimap.inverse().keySet());
/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
H A DEnumHashBiMap.java51 * Constructs a new bimap with the same mappings as the specified map. If the
53 * bimap has the same key type as the input bimap. Otherwise, the specified
62 EnumHashBiMap<K, V> bimap = create(EnumBiMap.inferKeyType(map));
63 bimap.putAll(map);
64 return bimap;
H A DHashBiMap.java46 * Constructs a new, empty bimap with the specified expected size.
57 * Constructs a new bimap containing initial values from {@code map}. The
58 * bimap is created with an initial capacity sufficient to hold the mappings
63 HashBiMap<K, V> bimap = create(map.size());
64 bimap.putAll(map);
65 return bimap;
H A DEnumBiMap.java53 * Returns a new bimap with the same mappings as the specified map. If the
54 * specified map is an {@code EnumBiMap}, the new bimap has the same types as
64 EnumBiMap<K, V> bimap = create(inferKeyType(map), inferValueType(map));
65 bimap.putAll(map);
66 return bimap;
H A DImmutableBiMap.java96 ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map;
97 return bimap;
H A DSynchronized.java1085 static <K, V> BiMap<K, V> biMap(BiMap<K, V> bimap, @Nullable Object mutex) { argument
1086 if (bimap instanceof SynchronizedBiMap ||
1087 bimap instanceof ImmutableBiMap) {
1088 return bimap;
1090 return new SynchronizedBiMap<K, V>(bimap, mutex, null);
H A DMaps.java269 * Returns a synchronized (thread-safe) bimap backed by the specified bimap.
271 * to the backing bimap is accomplished through the returned bimap.
290 * <p>The returned bimap will be serializable if the specified bimap is
293 * @param bimap the bimap to be wrapped in a synchronized view
294 * @return a sychronized view of the specified bimap
296 public static <K, V> BiMap<K, V> synchronizedBiMap(BiMap<K, V> bimap) { argument
829 unmodifiableBiMap( BiMap<? extends K, ? extends V> bimap) argument
[all...]
/external/guava/guava/src/com/google/common/collect/
H A DHashBiMap.java50 * Constructs a new, empty bimap with the specified expected size.
61 * Constructs a new bimap containing initial values from {@code map}. The
62 * bimap is created with an initial capacity sufficient to hold the mappings
67 HashBiMap<K, V> bimap = create(map.size());
68 bimap.putAll(map);
69 return bimap;
H A DEnumHashBiMap.java56 * Constructs a new bimap with the same mappings as the specified map. If the
58 * bimap has the same key type as the input bimap. Otherwise, the specified
67 EnumHashBiMap<K, V> bimap = create(EnumBiMap.inferKeyType(map));
68 bimap.putAll(map);
69 return bimap;
H A DImmutableBiMap.java33 * make a "defensive copy" of a bimap provided to your class by a caller.
50 * Returns the empty bimap.
59 * Returns an immutable bimap containing a single entry.
118 * A builder for creating immutable bimap instances, especially {@code public
132 * multiple times to build multiple bimaps in series. Each bimap is a superset
146 * Associates {@code key} with {@code value} in the built bimap. Duplicate
155 * Associates all of the given map's keys and values in the built bimap.
167 * Returns a newly-created immutable bimap.
181 * Returns an immutable bimap containing the same entries as {@code map}. If
197 ImmutableBiMap<K, V> bimap
312 SerializedForm(ImmutableBiMap<?, ?> bimap) argument
[all...]
H A DEnumBiMap.java57 * Returns a new bimap with the same mappings as the specified map. If the
58 * specified map is an {@code EnumBiMap}, the new bimap has the same types as
68 EnumBiMap<K, V> bimap = create(inferKeyType(map), inferValueType(map));
69 bimap.putAll(map);
70 return bimap;
H A DSynchronized.java1098 static <K, V> BiMap<K, V> biMap(BiMap<K, V> bimap, @Nullable Object mutex) { argument
1099 if (bimap instanceof SynchronizedBiMap ||
1100 bimap instanceof ImmutableBiMap) {
1101 return bimap;
1103 return new SynchronizedBiMap<K, V>(bimap, mutex, null);
H A DMaps.java272 * Returns a synchronized (thread-safe) bimap backed by the specified bimap.
274 * to the backing bimap is accomplished through the returned bimap.
293 * <p>The returned bimap will be serializable if the specified bimap is
296 * @param bimap the bimap to be wrapped in a synchronized view
297 * @return a sychronized view of the specified bimap
299 public static <K, V> BiMap<K, V> synchronizedBiMap(BiMap<K, V> bimap) { argument
858 unmodifiableBiMap( BiMap<? extends K, ? extends V> bimap) argument
[all...]
/external/chromium_org/third_party/mesa/src/src/gallium/drivers/nv50/codegen/
H A Dnv50_ir_util.h764 struct bimap
770 bimap() : l(back), r(forth) { }
771 bimap(const bimap<S, T> &m)
H A Dnv50_ir_build_util.h125 typedef bimap<Location, Value *> ValueMap;
/external/mesa3d/src/gallium/drivers/nv50/codegen/
H A Dnv50_ir_util.h764 struct bimap
770 bimap() : l(back), r(forth) { }
771 bimap(const bimap<S, T> &m)
H A Dnv50_ir_build_util.h125 typedef bimap<Location, Value *> ValueMap;

Completed in 322 milliseconds

12