/external/guava/guava-tests/test/com/google/common/collect/ |
D | ImmutableMapTest.java | 24 import com.google.common.collect.ImmutableMap.Builder; 177 return ImmutableMap.of(); in makeEmptyMap() 181 return ImmutableMap.of("one", 1, "two", 2, "three", 3); in makePopulatedMap() 196 return ImmutableMap.of("one", 1); in makePopulatedMap() 213 ImmutableMap.of("one", 1, "two", 2, "three", 3)); in makePopulatedMap() 234 return ImmutableMap.of( in makePopulatedMap() 254 return ImmutableMap.of(); in makeEmptyMap() 259 return ImmutableMap.of( in makePopulatedMap() 277 return ImmutableMap.of(0, unhashables.e0); in makePopulatedMap() 283 ImmutableMap<String, Integer> map in testEmptyBuilder() [all …]
|
D | RegularImmutableTableTest.java | 118 assertEquals(ImmutableMap.of('a', "foo", 'b', "bar"), in testColumn() 120 assertEquals(ImmutableMap.of('a', "baz"), testInstance.column(2)); in testColumn() 121 assertEquals(ImmutableMap.of(), testInstance.column(3)); in testColumn() 135 assertEquals(ImmutableMap.of(1, ImmutableMap.of('a', "foo", 'b', "bar"), in testColumnMap() 136 2, ImmutableMap.of('a', "baz")), testInstance.columnMap()); in testColumnMap() 172 assertEquals(ImmutableMap.of(1, "foo", 2, "baz"), in testRow() 174 assertEquals(ImmutableMap.of(1, "bar"), testInstance.row('b')); in testRow() 175 assertEquals(ImmutableMap.of(), testInstance.row('c')); in testRow() 189 assertEquals(ImmutableMap.of('a', ImmutableMap.of(1, "foo", 2, "baz"), in testRowMap() 190 'b', ImmutableMap.of(1, "bar")), testInstance.rowMap()); in testRowMap()
|
D | MapsTest.java | 368 Map<Integer, String> left = ImmutableMap.of( in testMapDifferenceTypical() 370 Map<Integer, String> right = ImmutableMap.of( in testMapDifferenceTypical() 375 assertEquals(ImmutableMap.of(2, "b", 4, "d"), diff1.entriesOnlyOnLeft()); in testMapDifferenceTypical() 376 assertEquals(ImmutableMap.of(6, "z"), diff1.entriesOnlyOnRight()); in testMapDifferenceTypical() 377 assertEquals(ImmutableMap.of(1, "a"), diff1.entriesInCommon()); in testMapDifferenceTypical() 378 assertEquals(ImmutableMap.of(3, in testMapDifferenceTypical() 387 assertEquals(ImmutableMap.of(6, "z"), diff2.entriesOnlyOnLeft()); in testMapDifferenceTypical() 388 assertEquals(ImmutableMap.of(2, "b", 4, "d"), diff2.entriesOnlyOnRight()); in testMapDifferenceTypical() 389 assertEquals(ImmutableMap.of(1, "a"), diff2.entriesInCommon()); in testMapDifferenceTypical() 390 assertEquals(ImmutableMap.of(3, in testMapDifferenceTypical() [all …]
|
D | SingletonImmutableTableTest.java | 43 assertEquals(ImmutableMap.of(), testTable.column(0)); in testColumn() 44 assertEquals(ImmutableMap.of('a', "blah"), testTable.column(1)); in testColumn() 52 assertEquals(ImmutableMap.of(1, ImmutableMap.of('a', "blah")), in testColumnMap() 57 assertEquals(ImmutableMap.of(), testTable.row('A')); in testRow() 58 assertEquals(ImmutableMap.of(1, "blah"), testTable.row('a')); in testRow() 66 assertEquals(ImmutableMap.of('a', ImmutableMap.of(1, "blah")), in testRowMap()
|
D | TreeBasedTableTest.java | 113 assertEquals(table.row("b"), ImmutableMap.of("b", "x", "x", "n")); in testClearSubMapOfRowMap() 115 assertEquals(table.row("b"), ImmutableMap.of()); in testClearSubMapOfRowMap() 288 assertEquals(ImmutableMap.of(1, 'b'), map.get("bar")); in testRowKeyMapHeadMap() 299 assertEquals(ImmutableMap.of(1, 'a', 3, 'c'), map.get("foo")); in testRowKeyMapTailMap() 310 assertEquals(ImmutableMap.of(2, 'd'), map.get("dog")); in testRowKeyMapSubMap() 429 assertEquals(ImmutableMap.of(1, 'a', 3, 'c'), row); in testSubRowClearAndPut() 430 assertEquals(ImmutableMap.of(3, 'c'), subRow); in testSubRowClearAndPut() 432 assertEquals(ImmutableMap.of(1, 'a'), row); in testSubRowClearAndPut() 433 assertEquals(ImmutableMap.of(), subRow); in testSubRowClearAndPut() 435 assertEquals(ImmutableMap.of(), row); in testSubRowClearAndPut() [all …]
|
D | AbstractTableTest.java | 159 assertEquals(ImmutableMap.of(1, 'a', 3, 'c'), row); in testRowClearAndPut() 161 assertEquals(ImmutableMap.of(1, 'a'), row); in testRowClearAndPut() 163 assertEquals(ImmutableMap.of(), row); in testRowClearAndPut() 165 assertEquals(ImmutableMap.of(2, 'b'), row); in testRowClearAndPut() 167 assertEquals(ImmutableMap.of(), row); in testRowClearAndPut() 169 assertEquals(ImmutableMap.of(5, 'x'), row); in testRowClearAndPut()
|
D | EmptyImmutableTableTest.java | 69 assertEquals(ImmutableMap.of(), INSTANCE.column(1)); in testColumn() 77 assertEquals(ImmutableMap.of(), INSTANCE.columnMap()); in testColumnMap() 97 assertEquals(ImmutableMap.of(), INSTANCE.row('a')); in testRow() 105 assertEquals(ImmutableMap.of(), INSTANCE.rowMap()); in testRowMap()
|
D | AbstractBiMapTest.java | 117 assertEquals(ImmutableMap.of("one", 1, "two", 2), inverse); in testInverseSimple() 127 assertEquals(ImmutableMap.of("one", 1, "two", 2), inverse); in testInversePut() 128 assertEquals(ImmutableMap.of(1, "one", 2, "two"), bimap); in testInversePut() 141 assertEquals(ImmutableMap.of(1, "one"), bimap); in testPut() 144 assertEquals(ImmutableMap.of(1, "one", 2, "two"), bimap); in testPut() 147 assertEquals(ImmutableMap.of(1, "one", 2, "two"), bimap); in testPut() 150 assertEquals(ImmutableMap.of(1, "ONE", 2, "two"), bimap); in testPut() 157 assertEquals(ImmutableMap.of(1, "ONE", 2, "two"), bimap); in testPut() 187 Map<Integer, String> newEntries = ImmutableMap.of(2, "two", 3, "three"); in testPutAll() 189 assertEquals(ImmutableMap.of(1, "one", 2, "two", 3, "three"), bimap); in testPutAll() [all …]
|
D | MapsTransformValuesTest.java | 98 ImmutableMap.<String, Integer>of(), Functions.toStringFunction()); in testTransformEmptyMapEquality() 104 ImmutableMap.of("a", 1), Functions.toStringFunction()); in testTransformSingletonMapEquality() 105 Map<String, String> expected = ImmutableMap.of("a", "1"); in testTransformSingletonMapEquality() 111 Map<String, Integer> underlying = ImmutableMap.of("a", 1); in testTransformIdentityFunctionEquality() 119 ImmutableMap.of("a", 1), Functions.toStringFunction()); in testTransformPutEntryIsUnsupported() 127 map.putAll(ImmutableMap.of("b", "2")); in testTransformPutEntryIsUnsupported() 161 Map<String, Boolean> expected = ImmutableMap.of("a", true, "b", false); in testTransformEqualityOfMapsWithNullValues() 243 Map<String, Integer> underlying = ImmutableMap.of("a", 0, "b", 1, "c", 2); in testTransformEquals() 255 map = Maps.transformValues(ImmutableMap.of("a", 1, "b", 2, "c", 3), in testTransformEquals()
|
/external/guava/guava/src/com/google/common/collect/ |
D | RegularImmutableTable.java | 171 private final ImmutableMap<R, Map<C, V>> rowMap; 172 private final ImmutableMap<C, Map<R, V>> columnMap; 178 private static final <A, B, V> Map<A, ImmutableMap.Builder<B, V>> 180 Map<A, ImmutableMap.Builder<B, V>> indexBuilder = Maps.newLinkedHashMap(); in makeIndexBuilder() 182 indexBuilder.put(key, ImmutableMap.<B, V>builder()); in makeIndexBuilder() 191 private static final <A, B, V> ImmutableMap<A, Map<B, V>> buildIndex( in buildIndex() 192 Map<A, ImmutableMap.Builder<B, V>> indexBuilder) { in buildIndex() 193 return ImmutableMap.copyOf(Maps.transformValues(indexBuilder, in buildIndex() 194 new Function<ImmutableMap.Builder<B, V>, Map<B, V>>() { in buildIndex() 195 @Override public Map<B, V> apply(ImmutableMap.Builder<B, V> from) { in buildIndex() [all …]
|
D | SingletonImmutableTable.java | 54 @Override public ImmutableMap<R, V> column(C columnKey) { in column() 57 ? ImmutableMap.of(singleRowKey, singleValue) in column() 58 : ImmutableMap.<R, V>of(); in column() 65 @Override public ImmutableMap<C, Map<R, V>> columnMap() { in columnMap() 66 return ImmutableMap.of(singleColumnKey, in columnMap() 67 (Map<R, V>) ImmutableMap.of(singleRowKey, singleValue)); in columnMap() 95 @Override public ImmutableMap<C, V> row(R rowKey) { in row() 98 ? ImmutableMap.of(singleColumnKey, singleValue) in row() 99 : ImmutableMap.<C, V>of(); in row() 106 @Override public ImmutableMap<R, Map<C, V>> rowMap() { in rowMap() [all …]
|
D | RegularImmutableBiMap.java | 29 final transient ImmutableMap<K, V> delegate; 32 RegularImmutableBiMap(ImmutableMap<K, V> delegate) { in RegularImmutableBiMap() 35 ImmutableMap.Builder<V, K> builder = ImmutableMap.builder(); in RegularImmutableBiMap() 39 ImmutableMap<V, K> backwardMap = builder.build(); in RegularImmutableBiMap() 43 RegularImmutableBiMap(ImmutableMap<K, V> delegate, in RegularImmutableBiMap() 49 @Override ImmutableMap<K, V> delegate() { in delegate()
|
D | ImmutableBiMap.java | 43 public abstract class ImmutableBiMap<K, V> extends ImmutableMap<K, V> 62 return new RegularImmutableBiMap<K, V>(ImmutableMap.of(k1, v1)); in of() 71 return new RegularImmutableBiMap<K, V>(ImmutableMap.of(k1, v1, k2, v2)); in of() 81 return new RegularImmutableBiMap<K, V>(ImmutableMap.of( in of() 92 return new RegularImmutableBiMap<K, V>(ImmutableMap.of( in of() 103 return new RegularImmutableBiMap<K, V>(ImmutableMap.of( in of() 137 public static final class Builder<K, V> extends ImmutableMap.Builder<K, V> { 172 ImmutableMap<K, V> map = super.build(); in build() 209 ImmutableMap<K, V> immutableMap = ImmutableMap.copyOf(map); in copyOf() 215 abstract ImmutableMap<K, V> delegate(); in delegate() [all …]
|
D | EmptyImmutableTable.java | 72 @Override public ImmutableMap<Object, Object> column(Object columnKey) { in column() 74 return ImmutableMap.of(); in column() 81 @Override public ImmutableMap<Object, Map<Object, Object>> columnMap() { in columnMap() 82 return ImmutableMap.of(); in columnMap() 102 @Override public ImmutableMap<Object, Object> row(Object rowKey) { in row() 104 return ImmutableMap.of(); in row() 111 @Override public ImmutableMap<Object, Map<Object, Object>> rowMap() { in rowMap() 112 return ImmutableMap.of(); in rowMap()
|
D | ImmutableMap.java | 56 public abstract class ImmutableMap<K, V> implements Map<K, V>, Serializable { class 64 public static <K, V> ImmutableMap<K, V> of() { in of() 65 return (ImmutableMap<K, V>) EmptyImmutableMap.INSTANCE; in of() 74 public static <K, V> ImmutableMap<K, V> of(K k1, V v1) { in of() 84 public static <K, V> ImmutableMap<K, V> of(K k1, V v1, K k2, V v2) { in of() 93 public static <K, V> ImmutableMap<K, V> of( in of() 104 public static <K, V> ImmutableMap<K, V> of( in of() 115 public static <K, V> ImmutableMap<K, V> of( in of() 230 public ImmutableMap<K, V> build() { in build() 234 private static <K, V> ImmutableMap<K, V> fromEntryList( in fromEntryList() [all …]
|
D | ExplicitOrdering.java | 29 final ImmutableMap<T, Integer> rankMap; 35 ExplicitOrdering(ImmutableMap<T, Integer> rankMap) { in ExplicitOrdering() 51 private static <T> ImmutableMap<T, Integer> buildRankMap( in buildRankMap() 53 ImmutableMap.Builder<T, Integer> builder = ImmutableMap.builder(); in buildRankMap()
|
/external/llvm/include/llvm/ADT/ |
D | ImmutableMap.h | 61 class ImmutableMap { 79 explicit ImmutableMap(const TreeTy* R) : Root(const_cast<TreeTy*>(R)) { in ImmutableMap() function 82 ImmutableMap(const ImmutableMap &X) : Root(X.Root) { in ImmutableMap() function 85 ImmutableMap &operator=(const ImmutableMap &X) { 93 ~ImmutableMap() { in ~ImmutableMap() 108 ImmutableMap getEmptyMap() { return ImmutableMap(F.getEmptyTree()); } in getEmptyMap() 110 ImmutableMap add(ImmutableMap Old, key_type_ref K, data_type_ref D) { in add() 112 return ImmutableMap(Canonicalize ? F.getCanonicalTree(T): T); in add() 115 ImmutableMap remove(ImmutableMap Old, key_type_ref K) { in remove() 117 return ImmutableMap(Canonicalize ? F.getCanonicalTree(T): T); in remove() [all …]
|
/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ |
D | ImmutableMap.java | 41 public abstract class ImmutableMap<K, V> implements Map<K, V>, Serializable { class 45 ImmutableMap() { in ImmutableMap() method in ImmutableMap 49 ImmutableMap(Map<? extends K, ? extends V> delegate) { in ImmutableMap() method in ImmutableMap 54 ImmutableMap(Entry<? extends K, ? extends V>... entries) { in ImmutableMap() method in ImmutableMap 68 public static <K, V> ImmutableMap<K, V> of() { in of() 69 return (ImmutableMap<K, V>) EmptyImmutableMap.INSTANCE; in of() 72 public static <K, V> ImmutableMap<K, V> of(K k1, V v1) { in of() 77 public static <K, V> ImmutableMap<K, V> of(K k1, V v1, K k2, V v2) { in of() 81 public static <K, V> ImmutableMap<K, V> of( in of() 87 public static <K, V> ImmutableMap<K, V> of( in of() [all …]
|
D | ImmutableBiMap.java | 27 public abstract class ImmutableBiMap<K, V> extends ImmutableMap<K,V> 40 return new RegularImmutableBiMap<K, V>(ImmutableMap.of(k1, v1)); in of() 44 return new RegularImmutableBiMap<K, V>(ImmutableMap.of(k1, v1, k2, v2)); in of() 49 return new RegularImmutableBiMap<K, V>(ImmutableMap.of( in of() 55 return new RegularImmutableBiMap<K, V>(ImmutableMap.of( in of() 61 return new RegularImmutableBiMap<K, V>(ImmutableMap.of( in of() 69 public static final class Builder<K, V> extends ImmutableMap.Builder<K, V> { 84 ImmutableMap<K, V> map = super.build(); in build() 104 ImmutableMap<K, V> immutableMap = ImmutableMap.copyOf(map); in copyOf()
|
D | RegularImmutableBiMap.java | 32 RegularImmutableBiMap(ImmutableMap<K, V> delegate) { in RegularImmutableBiMap() 35 ImmutableMap.Builder<V, K> builder = ImmutableMap.builder(); in RegularImmutableBiMap() 39 ImmutableMap<V, K> backwardMap = builder.build(); in RegularImmutableBiMap() 43 RegularImmutableBiMap(ImmutableMap<K, V> delegate, in RegularImmutableBiMap()
|
/external/owasp/sanitizer/src/main/org/owasp/html/ |
D | PolicyFactory.java | 39 import com.google.common.collect.ImmutableMap; 56 private final ImmutableMap<String, ElementAndAttributePolicies> policies; 57 private final ImmutableMap<String, AttributePolicy> globalAttrPolicies; 61 ImmutableMap<String, ElementAndAttributePolicies> policies, in PolicyFactory() 63 ImmutableMap<String, AttributePolicy> globalAttrPolicies) { in PolicyFactory() 134 ImmutableMap.Builder<String, ElementAndAttributePolicies> b in and() 135 = ImmutableMap.builder(); in and() 172 ImmutableMap<String, AttributePolicy> allGlobalAttrPolicies; in and() 178 ImmutableMap.Builder<String, AttributePolicy> ab = ImmutableMap.builder(); in and()
|
D | CssSchema.java | 37 import com.google.common.collect.ImmutableMap; 54 final ImmutableMap<String, String> fnKeys; 58 ImmutableMap<String, String> fnKeys) { in Property() 74 0, ImmutableSet.<String>of(), ImmutableMap.<String, String>of()); 76 private final ImmutableMap<String, Property> properties; 78 private CssSchema(ImmutableMap<String, Property> properties) { in CssSchema() 93 ImmutableMap.Builder<String, Property> propertiesBuilder = in withProperties() 94 ImmutableMap.builder(); in withProperties() 115 return new CssSchema(ImmutableMap.copyOf(properties)); in union() 164 static final ImmutableMap<String, Property> DEFINITIONS; [all …]
|
D | ElementAndAttributePolicies.java | 32 import com.google.common.collect.ImmutableMap; 46 final ImmutableMap<String, AttributePolicy> attrPolicies; 58 this.attrPolicies = ImmutableMap.copyOf(attrPolicies); in ElementAndAttributePolicies() 65 ImmutableMap.Builder<String, AttributePolicy> joinedAttrPolicies in and() 66 = ImmutableMap.builder(); in and()
|
/external/llvm/unittests/ADT/ |
D | ImmutableMapTest.cpp | 18 ImmutableMap<int, int>::Factory f; in TEST() 24 ImmutableMap<int, int> S = f.getEmptyMap(); in TEST() 31 ImmutableMap<int, int>::Factory f; in TEST() 32 ImmutableMap<int, int> S = f.getEmptyMap(); in TEST() 34 ImmutableMap<int, int> S2 = f.add(f.add(f.add(S, 3, 10), 4, 11), 5, 12); in TEST()
|
/external/guava/guava-testlib/src/com/google/common/collect/testing/google/ |
D | MapGenerators.java | 22 import com.google.common.collect.ImmutableMap; 23 import com.google.common.collect.ImmutableMap.Builder; 49 Builder<String, Integer> builder = ImmutableMap.builder(); in create() 67 Builder<Object, String> builder = ImmutableMap.builder(); in create() 90 Builder<Integer, UnhashableObject> builder = ImmutableMap.builder(); in create() 108 Builder<String, String> builder = ImmutableMap.builder(); in createFromEntries() 129 Builder<Integer, String> builder = ImmutableMap.builder(); in create()
|