/external/guava/guava-tests/test/com/google/common/collect/ |
D | AbstractBiMapTest.java | 33 BiMap<Integer, String> bimap = new AbstractBiMap<Integer, String>( 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() 50 BiMap<Integer, String> bimap = new AbstractBiMap<Integer, String>( in testIdentityEntrySetIteratorRemove() local 53 bimap.put(1, "one"); in testIdentityEntrySetIteratorRemove() 54 bimap.put(2, "two"); in testIdentityEntrySetIteratorRemove() [all …]
|
D | EnumBiMapTest.java | 117 EnumBiMap<Currency, Country> bimap = in testCreate() local 119 assertTrue(bimap.isEmpty()); in testCreate() 120 assertEquals("{}", bimap.toString()); in testCreate() 121 assertEquals(HashBiMap.create(), bimap); in testCreate() local 122 bimap.put(Currency.DOLLAR, Country.CANADA); in testCreate() 123 assertEquals(Country.CANADA, bimap.get(Currency.DOLLAR)); in testCreate() 124 assertEquals(Currency.DOLLAR, bimap.inverse().get(Country.CANADA)); in testCreate() 133 EnumBiMap<Currency, Country> bimap = EnumBiMap.create(map); in testCreateFromMap() local 134 assertEquals(Country.CANADA, bimap.get(Currency.DOLLAR)); in testCreateFromMap() 135 assertEquals(Currency.DOLLAR, bimap.inverse().get(Country.CANADA)); in testCreateFromMap() [all …]
|
D | ImmutableBiMapTest.java | 99 BiMap<K, V> bimap = (BiMap<K, V>) map; in assertMoreInvariants() local 104 assertEquals(entry.getKey(), bimap.inverse().get(entry.getValue())); in assertMoreInvariants() 383 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.of(); in testEmpty() local 384 assertEquals(Collections.<String, Integer>emptyMap(), bimap); in testEmpty() local 385 assertEquals(Collections.<String, Integer>emptyMap(), bimap.inverse()); in testEmpty() 392 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf( in testFromHashMap() local 394 assertMapEquals(bimap, "one", 1, "two", 2); in testFromHashMap() 395 assertMapEquals(bimap.inverse(), 1, "one", 2, "two"); in testFromHashMap() 399 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf( in testFromImmutableMap() local 407 assertMapEquals(bimap, in testFromImmutableMap() [all …]
|
D | HashBiMapTest.java | 78 HashBiMap<String, String> bimap = HashBiMap.create(map); in testMapConstructor() local 79 assertEquals("dollar", bimap.get("canada")); in testMapConstructor() 80 assertEquals("canada", bimap.inverse().get("dollar")); in testMapConstructor() 86 BiMap<Integer, Integer> bimap = HashBiMap.create(N); in testBashIt() local 87 BiMap<Integer, Integer> inverse = bimap.inverse(); in testBashIt() 90 assertNull(bimap.put(2 * i, 2 * i + 1)); in testBashIt() 93 assertEquals(2 * i + 1, (int) bimap.get(2 * i)); in testBashIt() 99 int oldValue = bimap.get(2 * i); in testBashIt() 100 assertEquals(2 * i + 1, (int) bimap.put(2 * i, oldValue - 2)); in testBashIt() 103 assertEquals(2 * i - 1, (int) bimap.get(2 * i)); in testBashIt() [all …]
|
D | EnumHashBiMapTest.java | 111 EnumHashBiMap<Currency, String> bimap = in testCreate() local 113 assertTrue(bimap.isEmpty()); in testCreate() 114 assertEquals("{}", bimap.toString()); in testCreate() 115 assertEquals(HashBiMap.create(), bimap); in testCreate() local 116 bimap.put(Currency.DOLLAR, "dollar"); in testCreate() 117 assertEquals("dollar", bimap.get(Currency.DOLLAR)); in testCreate() 118 assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar")); in testCreate() 127 EnumHashBiMap<Currency, String> bimap in testCreateFromMap() local 129 assertEquals("dollar", bimap.get(Currency.DOLLAR)); in testCreateFromMap() 130 assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar")); in testCreateFromMap() [all …]
|
D | ConstrainedBiMapTest.java | 108 BiMap<String, String> bimap = MapConstraints.constrainedBiMap( in create() local 112 checkArgument(!bimap.containsKey(entry.getKey())); in create() 113 bimap.put(entry.getKey(), entry.getValue()); in create() 115 return bimap; in create()
|
D | SynchronizedBiMapTest.java | 137 BiMap<String, Integer> bimap = create(); in testInverse() local 138 BiMap<Integer, String> inverse = bimap.inverse(); in testInverse() 139 assertSame(bimap, inverse.inverse()); in testInverse()
|
D | MapsCollectionTest.java | 86 BiMap<String, String> bimap = HashBiMap.create(entries.length); in suite() 88 checkArgument(!bimap.containsKey(entry.getKey())); in suite() 89 bimap.put(entry.getKey(), entry.getValue()); in suite() 91 return Maps.unmodifiableBiMap(bimap); in suite()
|
/external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/ |
D | EnumBiMapTest.java | 93 EnumBiMap<Currency, Country> bimap = in testCreate() local 95 assertTrue(bimap.isEmpty()); in testCreate() 96 assertEquals("{}", bimap.toString()); in testCreate() 97 assertEquals(HashBiMap.create(), bimap); in testCreate() local 98 bimap.put(Currency.DOLLAR, Country.CANADA); in testCreate() 99 assertEquals(Country.CANADA, bimap.get(Currency.DOLLAR)); in testCreate() 100 assertEquals(Currency.DOLLAR, bimap.inverse().get(Country.CANADA)); in testCreate() 109 EnumBiMap<Currency, Country> bimap = EnumBiMap.create(map); in testCreateFromMap() local 110 assertEquals(Country.CANADA, bimap.get(Currency.DOLLAR)); in testCreateFromMap() 111 assertEquals(Currency.DOLLAR, bimap.inverse().get(Country.CANADA)); in testCreateFromMap() [all …]
|
D | HashBiMapTest.java | 54 HashBiMap<String, String> bimap = HashBiMap.create(map); in testMapConstructor() local 55 assertEquals("dollar", bimap.get("canada")); in testMapConstructor() 56 assertEquals("canada", bimap.inverse().get("dollar")); in testMapConstructor() 62 BiMap<Integer, Integer> bimap = HashBiMap.create(N); in testBashIt() local 63 BiMap<Integer, Integer> inverse = bimap.inverse(); in testBashIt() 66 assertNull(bimap.put(2 * i, 2 * i + 1)); in testBashIt() 69 assertEquals(2 * i + 1, (int) bimap.get(2 * i)); in testBashIt() 75 int oldValue = bimap.get(2 * i); in testBashIt() 76 assertEquals(2 * i + 1, (int) bimap.put(2 * i, oldValue - 2)); in testBashIt() 79 assertEquals(2 * i - 1, (int) bimap.get(2 * i)); in testBashIt() [all …]
|
D | EnumHashBiMapTest.java | 86 EnumHashBiMap<Currency, String> bimap = in testCreate() local 88 assertTrue(bimap.isEmpty()); in testCreate() 89 assertEquals("{}", bimap.toString()); in testCreate() 90 assertEquals(HashBiMap.create(), bimap); in testCreate() local 91 bimap.put(Currency.DOLLAR, "dollar"); in testCreate() 92 assertEquals("dollar", bimap.get(Currency.DOLLAR)); in testCreate() 93 assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar")); in testCreate() 102 EnumHashBiMap<Currency, String> bimap in testCreateFromMap() local 104 assertEquals("dollar", bimap.get(Currency.DOLLAR)); in testCreateFromMap() 105 assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar")); in testCreateFromMap() [all …]
|
D | ImmutableBiMapTest.java | 58 BiMap<K, V> bimap = (BiMap<K, V>) map; in assertMoreInvariants() local 63 assertEquals(entry.getKey(), bimap.inverse().get(entry.getValue())); in assertMoreInvariants() 342 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.of(); in testEmpty() local 343 assertEquals(Collections.<String, Integer>emptyMap(), bimap); in testEmpty() local 344 assertEquals(Collections.<String, Integer>emptyMap(), bimap.inverse()); in testEmpty() 351 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf( in testFromHashMap() local 353 assertMapEquals(bimap, "one", 1, "two", 2); in testFromHashMap() 354 assertMapEquals(bimap.inverse(), 1, "one", 2, "two"); in testFromHashMap() 358 ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf( in testFromImmutableMap() local 366 assertMapEquals(bimap, in testFromImmutableMap() [all …]
|
D | ConstrainedBiMapTest.java | 82 BiMap<String, String> bimap = MapConstraints.constrainedBiMap( in create() local 86 checkArgument(!bimap.containsKey(entry.getKey())); in create() 87 bimap.put(entry.getKey(), entry.getValue()); in create() 89 return bimap; in create()
|
/external/guava/guava/src/com/google/common/collect/ |
D | ImmutableBiMap.java | 194 ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map; in copyOf() local 197 if (!bimap.isPartialView()) { in copyOf() 198 return bimap; in copyOf() 257 SerializedForm(ImmutableBiMap<?, ?> bimap) { in SerializedForm() argument 258 super(bimap); in SerializedForm()
|
D | EnumHashBiMap.java | 73 EnumHashBiMap<K, V> bimap = create(EnumBiMap.inferKeyType(map)); in create() local 74 bimap.putAll(map); in create() 75 return bimap; in create()
|
D | EnumBiMap.java | 73 EnumBiMap<K, V> bimap = create(inferKeyType(map), inferValueType(map)); in create() local 74 bimap.putAll(map); in create() 75 return bimap; in create()
|
D | HashBiMap.java | 76 HashBiMap<K, V> bimap = create(map.size()); in create() local 77 bimap.putAll(map); in create() 78 return bimap; in create() 637 private final HashBiMap<K, V> bimap; 639 InverseSerializedForm(HashBiMap<K, V> bimap) { 640 this.bimap = bimap; 644 return bimap.inverse();
|
D | Maps.java | 1314 public static <A, B> Converter<A, B> asConverter(final BiMap<A, B> bimap) { 1315 return new BiMapConverter<A, B>(bimap); 1319 private final BiMap<A, B> bimap; 1321 BiMapConverter(BiMap<A, B> bimap) { 1322 this.bimap = checkNotNull(bimap); 1327 return convert(bimap, a); 1332 return convert(bimap.inverse(), b); 1335 private static <X, Y> Y convert(BiMap<X, Y> bimap, X input) { 1336 Y output = bimap.get(input); 1345 return this.bimap.equals(that.bimap); [all …]
|
/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ |
D | HashBiMap.java | 57 HashBiMap<K, V> bimap = create(map.size()); in create() local 58 bimap.putAll(map); in create() 59 return bimap; in create()
|
D | EnumHashBiMap.java | 68 EnumHashBiMap<K, V> bimap = create(EnumBiMap.inferKeyType(map)); in create() local 69 bimap.putAll(map); in create() 70 return bimap; in create()
|
D | EnumBiMap.java | 69 EnumBiMap<K, V> bimap = create(inferKeyType(map), inferValueType(map)); in create() local 70 bimap.putAll(map); in create() 71 return bimap; in create()
|
D | Maps.java | 1112 public static <A, B> Converter<A, B> asConverter(final BiMap<A, B> bimap) { 1113 return new BiMapConverter<A, B>(bimap); 1117 private final BiMap<A, B> bimap; 1119 BiMapConverter(BiMap<A, B> bimap) { 1120 this.bimap = checkNotNull(bimap); 1125 return convert(bimap, a); 1130 return convert(bimap.inverse(), b); 1133 private static <X, Y> Y convert(BiMap<X, Y> bimap, X input) { 1134 Y output = bimap.get(input); 1143 return this.bimap.equals(that.bimap); [all …]
|
D | ImmutableBiMap.java | 95 ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map; in copyOf() local 96 return bimap; in copyOf()
|
D | Synchronized.java | 1087 static <K, V> BiMap<K, V> biMap(BiMap<K, V> bimap, @Nullable Object mutex) { 1088 if (bimap instanceof SynchronizedBiMap || 1089 bimap instanceof ImmutableBiMap) { 1090 return bimap; 1092 return new SynchronizedBiMap<K, V>(bimap, mutex, null);
|
/external/mesa3d/src/gallium/drivers/nouveau/codegen/ |
D | nv50_ir_util.h | 769 struct bimap struct 775 bimap() : l(back), r(forth) { } in bimap() argument 776 bimap(const bimap<S, T> &m) in bimap() function
|