/external/guava/guava-tests/test/com/google/common/collect/ |
D | AbstractBiMapTest.java | 33 BiMap<Integer, String> bimap = in testIdentityKeySetIteratorRemove() local 36 bimap.put(1, "one"); in testIdentityKeySetIteratorRemove() 37 bimap.put(2, "two"); in testIdentityKeySetIteratorRemove() 38 bimap.put(3, "three"); in testIdentityKeySetIteratorRemove() 39 Iterator<Integer> iterator = bimap.keySet().iterator(); in testIdentityKeySetIteratorRemove() 45 assertEquals(1, bimap.size()); in testIdentityKeySetIteratorRemove() 46 assertEquals(1, bimap.inverse().size()); in testIdentityKeySetIteratorRemove() 51 BiMap<Integer, String> bimap = in testIdentityEntrySetIteratorRemove() local 54 bimap.put(1, "one"); in testIdentityEntrySetIteratorRemove() 55 bimap.put(2, "two"); in testIdentityEntrySetIteratorRemove() [all …]
|
D | EnumBiMapTest.java | 130 EnumBiMap<Currency, Country> bimap = EnumBiMap.create(Currency.class, Country.class); in testCreate() local 131 assertTrue(bimap.isEmpty()); in testCreate() 132 assertEquals("{}", bimap.toString()); in testCreate() 133 assertEquals(HashBiMap.create(), bimap); in testCreate() local 134 bimap.put(Currency.DOLLAR, Country.CANADA); in testCreate() 135 assertEquals(Country.CANADA, bimap.get(Currency.DOLLAR)); in testCreate() 136 assertEquals(Currency.DOLLAR, bimap.inverse().get(Country.CANADA)); in testCreate() 146 EnumBiMap<Currency, Country> bimap = EnumBiMap.create(map); in testCreateFromMap() local 147 assertEquals(Country.CANADA, bimap.get(Currency.DOLLAR)); in testCreateFromMap() 148 assertEquals(Currency.DOLLAR, bimap.inverse().get(Country.CANADA)); in testCreateFromMap() [all …]
|
D | EnumHashBiMapTest.java | 124 EnumHashBiMap<Currency, String> bimap = EnumHashBiMap.create(Currency.class); in testCreate() local 125 assertTrue(bimap.isEmpty()); in testCreate() 126 assertEquals("{}", bimap.toString()); in testCreate() 127 assertEquals(HashBiMap.create(), bimap); in testCreate() local 128 bimap.put(Currency.DOLLAR, "dollar"); in testCreate() 129 assertEquals("dollar", bimap.get(Currency.DOLLAR)); in testCreate() 130 assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar")); in testCreate() 140 EnumHashBiMap<Currency, String> bimap = EnumHashBiMap.create(map); in testCreateFromMap() local 141 assertEquals("dollar", bimap.get(Currency.DOLLAR)); in testCreateFromMap() 142 assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar")); in testCreateFromMap() [all …]
|
D | ImmutableBiMapTest.java | 145 BiMap<K, V> bimap = (BiMap<K, V>) map; in assertMoreInvariants() local 149 assertEquals(entry.getKey(), bimap.inverse().get(entry.getValue())); in assertMoreInvariants() 495 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.of(); in testEmpty() local 496 assertEquals(Collections.<String, Integer>emptyMap(), bimap); in testEmpty() local 497 assertEquals(Collections.<String, Integer>emptyMap(), bimap.inverse()); in testEmpty() 504 ImmutableBiMap<String, Integer> bimap = in testFromHashMap() local 506 assertMapEquals(bimap, "one", 1, "two", 2); in testFromHashMap() 507 assertMapEquals(bimap.inverse(), 1, "one", 2, "two"); in testFromHashMap() 511 ImmutableBiMap<String, Integer> bimap = in testFromImmutableMap() local 520 assertMapEquals(bimap, "one", 1, "two", 2, "three", 3, "four", 4, "five", 5); in testFromImmutableMap() [all …]
|
D | HashBiMapTest.java | 82 HashBiMap<String, String> bimap = HashBiMap.create(map); in testMapConstructor() local 83 assertEquals("dollar", bimap.get("canada")); in testMapConstructor() 84 assertEquals("canada", bimap.inverse().get("dollar")); in testMapConstructor() 90 BiMap<Integer, Integer> bimap = HashBiMap.create(N); in testBashIt() local 91 BiMap<Integer, Integer> inverse = bimap.inverse(); in testBashIt() 94 assertNull(bimap.put(2 * i, 2 * i + 1)); in testBashIt() 97 assertEquals(2 * i + 1, (int) bimap.get(2 * i)); in testBashIt() 103 int oldValue = bimap.get(2 * i); in testBashIt() 104 assertEquals(2 * i + 1, (int) bimap.put(2 * i, oldValue - 2)); in testBashIt() 107 assertEquals(2 * i - 1, (int) bimap.get(2 * i)); in testBashIt() [all …]
|
D | SynchronizedBiMapTest.java | 146 BiMap<String, Integer> bimap = create(); in testInverse() local 147 BiMap<Integer, String> inverse = bimap.inverse(); in testInverse() 148 assertSame(bimap, inverse.inverse()); in testInverse()
|
D | MapsCollectionTest.java | 85 BiMap<String, String> bimap = HashBiMap.create(entries.length); in suite() 87 checkArgument(!bimap.containsKey(entry.getKey())); in suite() 88 bimap.put(entry.getKey(), entry.getValue()); in suite() 90 return Maps.unmodifiableBiMap(bimap); in suite()
|
/external/guava/android/guava-tests/test/com/google/common/collect/ |
D | AbstractBiMapTest.java | 33 BiMap<Integer, String> bimap = in testIdentityKeySetIteratorRemove() local 36 bimap.put(1, "one"); in testIdentityKeySetIteratorRemove() 37 bimap.put(2, "two"); in testIdentityKeySetIteratorRemove() 38 bimap.put(3, "three"); in testIdentityKeySetIteratorRemove() 39 Iterator<Integer> iterator = bimap.keySet().iterator(); in testIdentityKeySetIteratorRemove() 45 assertEquals(1, bimap.size()); in testIdentityKeySetIteratorRemove() 46 assertEquals(1, bimap.inverse().size()); in testIdentityKeySetIteratorRemove() 51 BiMap<Integer, String> bimap = in testIdentityEntrySetIteratorRemove() local 54 bimap.put(1, "one"); in testIdentityEntrySetIteratorRemove() 55 bimap.put(2, "two"); in testIdentityEntrySetIteratorRemove() [all …]
|
D | EnumBiMapTest.java | 130 EnumBiMap<Currency, Country> bimap = EnumBiMap.create(Currency.class, Country.class); in testCreate() local 131 assertTrue(bimap.isEmpty()); in testCreate() 132 assertEquals("{}", bimap.toString()); in testCreate() 133 assertEquals(HashBiMap.create(), bimap); in testCreate() local 134 bimap.put(Currency.DOLLAR, Country.CANADA); in testCreate() 135 assertEquals(Country.CANADA, bimap.get(Currency.DOLLAR)); in testCreate() 136 assertEquals(Currency.DOLLAR, bimap.inverse().get(Country.CANADA)); in testCreate() 146 EnumBiMap<Currency, Country> bimap = EnumBiMap.create(map); in testCreateFromMap() local 147 assertEquals(Country.CANADA, bimap.get(Currency.DOLLAR)); in testCreateFromMap() 148 assertEquals(Currency.DOLLAR, bimap.inverse().get(Country.CANADA)); in testCreateFromMap() [all …]
|
D | EnumHashBiMapTest.java | 124 EnumHashBiMap<Currency, String> bimap = EnumHashBiMap.create(Currency.class); in testCreate() local 125 assertTrue(bimap.isEmpty()); in testCreate() 126 assertEquals("{}", bimap.toString()); in testCreate() 127 assertEquals(HashBiMap.create(), bimap); in testCreate() local 128 bimap.put(Currency.DOLLAR, "dollar"); in testCreate() 129 assertEquals("dollar", bimap.get(Currency.DOLLAR)); in testCreate() 130 assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar")); in testCreate() 140 EnumHashBiMap<Currency, String> bimap = EnumHashBiMap.create(map); in testCreateFromMap() local 141 assertEquals("dollar", bimap.get(Currency.DOLLAR)); in testCreateFromMap() 142 assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar")); in testCreateFromMap() [all …]
|
D | ImmutableBiMapTest.java | 114 BiMap<K, V> bimap = (BiMap<K, V>) map; in assertMoreInvariants() local 118 assertEquals(entry.getKey(), bimap.inverse().get(entry.getValue())); in assertMoreInvariants() 464 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.of(); in testEmpty() local 465 assertEquals(Collections.<String, Integer>emptyMap(), bimap); in testEmpty() local 466 assertEquals(Collections.<String, Integer>emptyMap(), bimap.inverse()); in testEmpty() 473 ImmutableBiMap<String, Integer> bimap = in testFromHashMap() local 475 assertMapEquals(bimap, "one", 1, "two", 2); in testFromHashMap() 476 assertMapEquals(bimap.inverse(), 1, "one", 2, "two"); in testFromHashMap() 480 ImmutableBiMap<String, Integer> bimap = in testFromImmutableMap() local 489 assertMapEquals(bimap, "one", 1, "two", 2, "three", 3, "four", 4, "five", 5); in testFromImmutableMap() [all …]
|
D | HashBiMapTest.java | 82 HashBiMap<String, String> bimap = HashBiMap.create(map); in testMapConstructor() local 83 assertEquals("dollar", bimap.get("canada")); in testMapConstructor() 84 assertEquals("canada", bimap.inverse().get("dollar")); in testMapConstructor() 90 BiMap<Integer, Integer> bimap = HashBiMap.create(N); in testBashIt() local 91 BiMap<Integer, Integer> inverse = bimap.inverse(); in testBashIt() 94 assertNull(bimap.put(2 * i, 2 * i + 1)); in testBashIt() 97 assertEquals(2 * i + 1, (int) bimap.get(2 * i)); in testBashIt() 103 int oldValue = bimap.get(2 * i); in testBashIt() 104 assertEquals(2 * i + 1, (int) bimap.put(2 * i, oldValue - 2)); in testBashIt() 107 assertEquals(2 * i - 1, (int) bimap.get(2 * i)); in testBashIt() [all …]
|
D | SynchronizedBiMapTest.java | 139 BiMap<String, Integer> bimap = create(); in testInverse() local 140 BiMap<Integer, String> inverse = bimap.inverse(); in testInverse() 141 assertSame(bimap, inverse.inverse()); in testInverse()
|
D | MapsCollectionTest.java | 85 BiMap<String, String> bimap = HashBiMap.create(entries.length); in suite() 87 checkArgument(!bimap.containsKey(entry.getKey())); in suite() 88 bimap.put(entry.getKey(), entry.getValue()); in suite() 90 return Maps.unmodifiableBiMap(bimap); in suite()
|
/external/guava/android/guava/src/com/google/common/collect/ |
D | ImmutableBiMap.java | 280 ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map; in copyOf() local 283 if (!bimap.isPartialView()) { in copyOf() 284 return bimap; in copyOf() 355 SerializedForm(ImmutableBiMap<K, V> bimap) { in SerializedForm() argument 356 super(bimap); in SerializedForm()
|
D | EnumHashBiMap.java | 67 EnumHashBiMap<K, V> bimap = create(EnumBiMap.inferKeyType(map)); in create() local 68 bimap.putAll(map); in create() 69 return bimap; in create()
|
D | EnumBiMap.java | 66 EnumBiMap<K, V> bimap = create(inferKeyType(map), inferValueType(map)); in create() local 67 bimap.putAll(map); in create() 68 return bimap; in create()
|
D | Maps.java | 1367 public static <A, B> Converter<A, B> asConverter(final BiMap<A, B> bimap) { 1368 return new BiMapConverter<>(bimap); 1372 private final BiMap<A, B> bimap; 1374 BiMapConverter(BiMap<A, B> bimap) { 1375 this.bimap = checkNotNull(bimap); 1380 return convert(bimap, a); 1385 return convert(bimap.inverse(), b); 1388 private static <X, Y> Y convert(BiMap<X, Y> bimap, X input) { 1389 Y output = bimap.get(input); 1398 return this.bimap.equals(that.bimap); [all …]
|
/external/guava/guava/src/com/google/common/collect/ |
D | EnumHashBiMap.java | 67 EnumHashBiMap<K, V> bimap = create(EnumBiMap.inferKeyType(map)); in create() local 68 bimap.putAll(map); in create() 69 return bimap; in create()
|
D | ImmutableBiMap.java | 332 ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map; in copyOf() local 335 if (!bimap.isPartialView()) { in copyOf() 336 return bimap; in copyOf() 417 SerializedForm(ImmutableBiMap<K, V> bimap) { in SerializedForm() argument 418 super(bimap); in SerializedForm()
|
D | EnumBiMap.java | 66 EnumBiMap<K, V> bimap = create(inferKeyType(map), inferValueType(map)); in create() local 67 bimap.putAll(map); in create() 68 return bimap; in create()
|
D | HashBiMap.java | 82 HashBiMap<K, V> bimap = create(map.size()); in create() local 83 bimap.putAll(map); in create() 84 return bimap; in create() 728 private final HashBiMap<K, V> bimap; 730 InverseSerializedForm(HashBiMap<K, V> bimap) { 731 this.bimap = bimap; 735 return bimap.inverse();
|
D | Maps.java | 1493 public static <A, B> Converter<A, B> asConverter(final BiMap<A, B> bimap) { 1494 return new BiMapConverter<>(bimap); 1498 private final BiMap<A, B> bimap; 1500 BiMapConverter(BiMap<A, B> bimap) { 1501 this.bimap = checkNotNull(bimap); 1506 return convert(bimap, a); 1511 return convert(bimap.inverse(), b); 1514 private static <X, Y> Y convert(BiMap<X, Y> bimap, X input) { 1515 Y output = bimap.get(input); 1524 return this.bimap.equals(that.bimap); [all …]
|
/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ |
D | ImmutableBiMap.java | 132 ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map; in copyOf() local 133 return bimap; in copyOf()
|
/external/mesa3d/src/gallium/drivers/nouveau/codegen/ |
D | nv50_ir_util.h | 772 struct bimap struct 778 bimap() : l(back), r(forth) { } in bimap() function 779 bimap(const bimap<S, T> &m) in bimap() function
|