HomeSort by relevance Sort by last modified time
    Searched refs:bimap (Results 1 - 25 of 38) sorted by null

1 2

  /external/guava/guava-tests/test/com/google/common/collect/
AbstractBiMapTest.java 35 * Common tests for any {@code BiMap}.
42 protected abstract BiMap<Integer, String> create();
44 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())
    [all...]
HashBiMapTest.java 35 @Override protected BiMap<Integer, String> create() {
40 BiMap<String, String> bimap = HashBiMap.create(); local
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); local
54 assertEquals("dollar", bimap.get("canada"));
55 assertEquals("canada", bimap.inverse().get("dollar"))
61 BiMap<Integer, Integer> bimap = HashBiMap.create(N); local
    [all...]
EnumHashBiMapTest.java 40 EnumHashBiMap<Currency, String> bimap = local
42 assertTrue(bimap.isEmpty());
43 assertEquals("{}", bimap.toString());
44 assertEquals(HashBiMap.create(), bimap); local
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 local
58 assertEquals("dollar", bimap.get(Currency.DOLLAR));
59 assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar"))
126 EnumHashBiMap<Currency, String> bimap = local
137 EnumHashBiMap<Currency, String> bimap local
146 EnumHashBiMap<Currency, String> bimap = local
164 EnumHashBiMap<Currency, String> bimap local
    [all...]
EnumBiMapTest.java 43 EnumBiMap<Currency, Country> bimap = local
45 assertTrue(bimap.isEmpty());
46 assertEquals("{}", bimap.toString());
47 assertEquals(HashBiMap.create(), bimap); local
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); local
60 assertEquals(Country.CANADA, bimap.get(Currency.DOLLAR));
61 assertEquals(Currency.DOLLAR, bimap.inverse().get(Country.CANADA))
104 EnumBiMap<Currency, Country> bimap = local
110 EnumBiMap<Currency, Country> bimap = local
121 EnumBiMap<Currency, Country> bimap = EnumBiMap.create(map); local
135 EnumBiMap<Currency, Country> bimap = EnumBiMap.create(map); local
156 EnumBiMap<Currency, Country> bimap = EnumBiMap.create(map); local
    [all...]
BiMapMapInterfaceTest.java 62 BiMap<String, Integer> bimap = (BiMap<String, Integer>) map; local
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() local
    [all...]
BiMapCollectionTest.java 43 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();
ImmutableBiMapTest.java 157 BiMap<K, V> bimap = (BiMap<K, V>) map; local
162 assertEquals(entry.getKey(), bimap.inverse().get(entry.getValue()));
441 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.of(); local
442 assertEquals(Collections.<String, Integer>emptyMap(), bimap); local
443 assertEquals(Collections.<String, Integer>emptyMap(), bimap.inverse());
450 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf( local
452 assertMapEquals(bimap, "one", 1, "two", 2);
453 assertMapEquals(bimap.inverse(), 1, "one", 2, "two")
457 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf( local
492 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf( local
501 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf( local
509 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf( local
517 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf( local
524 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.of(); local
530 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf( local
541 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf( local
    [all...]
SynchronizedBiMapTest.java 27 * Tests for {@code Synchronized#biMap}.
39 @Override protected <K, V> BiMap<K, V> create() {
42 BiMap<K, V> outer = Synchronized.biMap(inner, mutex);
46 static class TestBiMap<K, V> extends TestMap<K, V> implements BiMap<K, V> {
47 private final BiMap<K, V> delegate;
49 public TestBiMap(BiMap<K, V> delegate, Object mutex) {
61 public BiMap<V, K> inverse() {
79 BiMap<String, Integer> bimap = create() local
    [all...]
MapsTest.java 316 tester.setDefault(BiMap.class, ImmutableBiMap.of());
602 private static final BiMap<Integer, String> INT_TO_STRING_MAP =
805 BiMap<Integer, String> mod = HashBiMap.create();
810 BiMap<Number, String> unmod = Maps.<Number, String>unmodifiableBiMap(mod);
836 BiMap<String, Number> inverse = unmod.inverse();
870 BiMap<Integer, String> map = HashBiMap.create();
    [all...]
  /external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
EnumHashBiMap.java 27 * A {@code BiMap} backed by an {@code EnumMap} instance for keys-to-values, and
51 * 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)); local
63 bimap.putAll(map);
64 return bimap;
HashBiMap.java 27 * A {@link BiMap} backed by two {@link HashMap} instances. This implementation
46 * 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()); local
64 bimap.putAll(map);
65 return bimap;
EnumBiMap.java 27 * A {@code BiMap} backed by two {@code EnumMap} instances. Null keys and values
53 * 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)); local
65 bimap.putAll(map);
66 return bimap;
ImmutableBiMap.java 28 implements BiMap<K, V> {
96 ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map; local
97 return bimap;
Synchronized.java 1085 static <K, V> BiMap<K, V> biMap(BiMap<K, V> bimap, @Nullable Object mutex) {
1086 if (bimap instanceof SynchronizedBiMap ||
1087 bimap instanceof ImmutableBiMap) {
1088 return bimap;
1090 return new SynchronizedBiMap<K, V>(bimap, mutex, null);
1094 extends SynchronizedMap<K, V> implements BiMap<K, V>, Serializable {
1096 private transient BiMap<V, K> inverse
    [all...]
Maps.java 269 * Returns a synchronized (thread-safe) bimap backed by the specified bimap.
271 * to the backing bimap is accomplished through the returned bimap.
276 * BiMap<Long, String> map = Maps.synchronizedBiMap(
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
    [all...]
  /external/guava/guava/src/com/google/common/collect/
HashBiMap.java 31 * A {@link BiMap} backed by two {@link HashMap} instances. This implementation
50 * 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()); local
68 bimap.putAll(map);
69 return bimap;
EnumHashBiMap.java 32 * A {@code BiMap} backed by an {@code EnumMap} instance for keys-to-values, and
56 * 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)); local
68 bimap.putAll(map);
69 return bimap;
ImmutableBiMap.java 26 * An immutable {@link BiMap} with reliable user-specified iteration order. Does
33 * make a "defensive copy" of a bimap provided to your class by a caller.
44 implements BiMap<K, V> {
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
197 ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map; local
    [all...]
EnumBiMap.java 31 * A {@code BiMap} backed by two {@code EnumMap} instances. Null keys and values
57 * 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)); local
69 bimap.putAll(map);
70 return bimap;
Synchronized.java 1098 static <K, V> BiMap<K, V> biMap(BiMap<K, V> bimap, @Nullable Object mutex) {
1099 if (bimap instanceof SynchronizedBiMap ||
1100 bimap instanceof ImmutableBiMap) {
1101 return bimap;
1103 return new SynchronizedBiMap<K, V>(bimap, mutex, null);
1107 extends SynchronizedMap<K, V> implements BiMap<K, V>, Serializable {
1109 private transient BiMap<V, K> inverse
    [all...]
Maps.java 272 * Returns a synchronized (thread-safe) bimap backed by the specified bimap.
274 * to the backing bimap is accomplished through the returned bimap.
279 * BiMap<Long, String> map = Maps.synchronizedBiMap(
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
    [all...]
  /external/chromium_org/third_party/mesa/src/src/gallium/drivers/nv50/codegen/
nv50_ir_util.h 764 struct bimap
770 bimap() : l(back), r(forth) { }
771 bimap(const bimap<S, T> &m)
nv50_ir_build_util.h 125 typedef bimap<Location, Value *> ValueMap;
  /external/mesa3d/src/gallium/drivers/nv50/codegen/
nv50_ir_util.h 764 struct bimap
770 bimap() : l(back), r(forth) { }
771 bimap(const bimap<S, T> &m)
nv50_ir_build_util.h 125 typedef bimap<Location, Value *> ValueMap;

Completed in 914 milliseconds

1 2