Home
last modified time | relevance | path

Searched refs:multimap (Results 1 – 25 of 350) sorted by relevance

12345678910>>...14

/external/guava/android/guava-tests/test/com/google/common/collect/
DLinkedHashMultimapTest.java63 SetMultimap<String, String> multimap = LinkedHashMultimap.create(); in suite()
65 multimap.put(entry.getKey(), entry.getValue()); in suite()
67 return multimap; in suite()
87 LinkedHashMultimap<String, Integer> multimap = LinkedHashMultimap.create(); in testValueSetHashTableExpansion() local
89 multimap.put("a", z); in testValueSetHashTableExpansion()
93 (LinkedHashMultimap.ValueSet) multimap.backingMap().get("a"); in testValueSetHashTableExpansion()
104 Multimap<String, Integer> multimap = LinkedHashMultimap.create(); in initializeMultimap5() local
105 multimap.put("foo", 5); in initializeMultimap5()
106 multimap.put("bar", 4); in initializeMultimap5()
107 multimap.put("foo", 3); in initializeMultimap5()
[all …]
DImmutableSetMultimapTest.java85 ImmutableSetMultimap<String, Integer> multimap = in testBuilder_withImmutableEntry() local
87 assertEquals(ImmutableSet.of(1), multimap.get("one")); in testBuilder_withImmutableEntry()
135 Multimap<String, Integer> multimap = builder.build(); in testBuilderPutAllIterable() local
136 assertEquals(ImmutableSet.of(1, 2, 3, 6, 7), multimap.get("foo")); in testBuilderPutAllIterable()
137 assertEquals(ImmutableSet.of(4, 5), multimap.get("bar")); in testBuilderPutAllIterable()
138 assertEquals(7, multimap.size()); in testBuilderPutAllIterable()
146 Multimap<String, Integer> multimap = builder.build(); in testBuilderPutAllVarargs() local
147 assertEquals(ImmutableSet.of(1, 2, 3, 6, 7), multimap.get("foo")); in testBuilderPutAllVarargs()
148 assertEquals(ImmutableSet.of(4, 5), multimap.get("bar")); in testBuilderPutAllVarargs()
149 assertEquals(7, multimap.size()); in testBuilderPutAllVarargs()
[all …]
DArrayListMultimapTest.java53 ListMultimap<String, String> multimap = ArrayListMultimap.create(); in suite()
55 multimap.put(entry.getKey(), entry.getValue()); in suite()
57 return multimap; in suite()
81 Multimap<String, Integer> multimap = create(); in testGetRandomAccess() local
82 multimap.put("foo", 1); in testGetRandomAccess()
83 multimap.put("foo", 3); in testGetRandomAccess()
84 assertTrue(multimap.get("foo") instanceof RandomAccess); in testGetRandomAccess()
85 assertTrue(multimap.get("bar") instanceof RandomAccess); in testGetRandomAccess()
90 Multimap<String, Integer> multimap = create(); in testRemoveAllRandomAccess() local
91 multimap.put("foo", 1); in testRemoveAllRandomAccess()
[all …]
DImmutableListMultimapTest.java85 ImmutableListMultimap<String, Integer> multimap = in testBuilder_withImmutableEntry() local
87 assertEquals(Arrays.asList(1), multimap.get("one")); in testBuilder_withImmutableEntry()
135 Multimap<String, Integer> multimap = builder.build(); in testBuilderPutAllIterable() local
136 assertEquals(Arrays.asList(1, 2, 3, 6, 7), multimap.get("foo")); in testBuilderPutAllIterable()
137 assertEquals(Arrays.asList(4, 5), multimap.get("bar")); in testBuilderPutAllIterable()
138 assertEquals(7, multimap.size()); in testBuilderPutAllIterable()
146 Multimap<String, Integer> multimap = builder.build(); in testBuilderPutAllVarargs() local
147 assertEquals(Arrays.asList(1, 2, 3, 6, 7), multimap.get("foo")); in testBuilderPutAllVarargs()
148 assertEquals(Arrays.asList(4, 5), multimap.get("bar")); in testBuilderPutAllVarargs()
149 assertEquals(7, multimap.size()); in testBuilderPutAllVarargs()
[all …]
DTreeMultimapExplicitTest.java73 TreeMultimap<String, Integer> multimap = in createPopulate() local
75 multimap.put("google", 2); in createPopulate()
76 multimap.put("google", 6); in createPopulate()
77 multimap.put(null, 3); in createPopulate()
78 multimap.put(null, 1); in createPopulate()
79 multimap.put(null, 7); in createPopulate()
80 multimap.put("tree", 0); in createPopulate()
81 multimap.put("tree", null); in createPopulate()
82 return multimap; in createPopulate()
106 Multimap<String, Integer> multimap = create(); in testToString() local
[all …]
DLinkedListMultimapTest.java67 ListMultimap<String, String> multimap = LinkedListMultimap.create(); in suite()
69 multimap.put(entry.getKey(), entry.getValue()); in suite()
71 return multimap; in suite()
95 Multimap<String, Integer> multimap = create(); in testGetRandomAccess() local
96 multimap.put("foo", 1); in testGetRandomAccess()
97 multimap.put("foo", 3); in testGetRandomAccess()
98 assertFalse(multimap.get("foo") instanceof RandomAccess); in testGetRandomAccess()
99 assertFalse(multimap.get("bar") instanceof RandomAccess); in testGetRandomAccess()
107 Multimap<String, Integer> multimap = create(); in testRemoveAllRandomAccess() local
108 multimap.put("foo", 1); in testRemoveAllRandomAccess()
[all …]
DMultimapsTest.java125 ListMultimap<String, Integer> multimap = Multimaps.unmodifiableListMultimap(delegate); in testUnmodifiableArrayListMultimapRandomAccess() local
126 assertTrue(multimap.get("foo") instanceof RandomAccess); in testUnmodifiableArrayListMultimapRandomAccess()
127 assertTrue(multimap.get("bar") instanceof RandomAccess); in testUnmodifiableArrayListMultimapRandomAccess()
134 ListMultimap<String, Integer> multimap = Multimaps.unmodifiableListMultimap(delegate); in testUnmodifiableLinkedListMultimapRandomAccess() local
135 assertFalse(multimap.get("foo") instanceof RandomAccess); in testUnmodifiableLinkedListMultimapRandomAccess()
136 assertFalse(multimap.get("bar") instanceof RandomAccess); in testUnmodifiableLinkedListMultimapRandomAccess()
201 SortedSetMultimap<String, Integer> multimap = Multimaps.synchronizedSortedSetMultimap(delegate); in testUnmodifiableSynchronizedTreeMultimap() local
202 checkUnmodifiableMultimap(multimap, false, "null", 42); in testUnmodifiableSynchronizedTreeMultimap()
203 assertSame(INT_COMPARATOR, multimap.valueComparator()); in testUnmodifiableSynchronizedTreeMultimap()
210 SortedSetMultimap<String, Integer> multimap = Multimaps.synchronizedSortedSetMultimap(delegate); in testSerializingUnmodifiableSynchronizedTreeMultimap() local
[all …]
DTreeMultimapNaturalTest.java71 SetMultimap<String, String> multimap = in suite()
75 multimap.put(entry.getKey(), entry.getValue()); in suite()
77 return multimap; in suite()
112 TreeMultimap<String, Integer> multimap = in suite()
115 multimap.put(elements[i], i); in suite()
117 return multimap.keySet(); in suite()
180 TreeMultimap<String, String> multimap = TreeMultimap.create(); in suite()
185 checkArgument(!multimap.containsKey(entry.getKey())); in suite()
186 multimap.putAll(entry.getKey(), entry.getValue()); in suite()
188 return multimap.asMap(); in suite()
[all …]
DMultimapsCollectionTest.java99 static void populateMultimapForGet(Multimap<Integer, String> multimap, String[] elements) { in populateMultimapForGet() argument
100 multimap.put(2, "foo"); in populateMultimapForGet()
102 multimap.put(3, element); in populateMultimapForGet()
106 static void populateMultimapForKeySet(Multimap<String, Integer> multimap, String[] elements) { in populateMultimapForKeySet() argument
108 multimap.put(element, 2); in populateMultimapForKeySet()
109 multimap.put(element, 3); in populateMultimapForKeySet()
113 static void populateMultimapForValues(Multimap<Integer, String> multimap, String[] elements) { in populateMultimapForValues() argument
115 multimap.put(i % 2, elements[i]); in populateMultimapForValues()
119 static void populateMultimapForKeys(Multimap<String, Integer> multimap, String[] elements) { in populateMultimapForKeys() argument
121 multimap.put(elements[i], i); in populateMultimapForKeys()
[all …]
DHashMultimapTest.java47 SetMultimap<String, String> multimap = HashMultimap.create(); in suite()
49 multimap.put(entry.getKey(), entry.getValue()); in suite()
51 return multimap; in suite()
74 HashMultimap<String, Integer> multimap = HashMultimap.create(); in testCreate() local
75 multimap.put("foo", 1); in testCreate()
76 multimap.put("bar", 2); in testCreate()
77 multimap.put("foo", 3); in testCreate()
78 assertEquals(ImmutableSet.of(1, 3), multimap.get("foo")); in testCreate()
79 assertEquals(2, multimap.expectedValuesPerKey); in testCreate()
83 HashMultimap<String, Integer> multimap = HashMultimap.create(); in testCreateFromMultimap() local
[all …]
/external/guava/guava-tests/test/com/google/common/collect/
DLinkedHashMultimapTest.java64 SetMultimap<String, String> multimap = LinkedHashMultimap.create(); in suite()
66 multimap.put(entry.getKey(), entry.getValue()); in suite()
68 return multimap; in suite()
88 LinkedHashMultimap<String, Integer> multimap = LinkedHashMultimap.create(); in testValueSetHashTableExpansion() local
90 multimap.put("a", z); in testValueSetHashTableExpansion()
94 (LinkedHashMultimap.ValueSet) multimap.backingMap().get("a"); in testValueSetHashTableExpansion()
105 Multimap<String, Integer> multimap = LinkedHashMultimap.create(); in initializeMultimap5() local
106 multimap.put("foo", 5); in initializeMultimap5()
107 multimap.put("bar", 4); in initializeMultimap5()
108 multimap.put("foo", 3); in initializeMultimap5()
[all …]
DArrayListMultimapTest.java53 ListMultimap<String, String> multimap = ArrayListMultimap.create(); in suite()
55 multimap.put(entry.getKey(), entry.getValue()); in suite()
57 return multimap; in suite()
81 Multimap<String, Integer> multimap = create(); in testGetRandomAccess() local
82 multimap.put("foo", 1); in testGetRandomAccess()
83 multimap.put("foo", 3); in testGetRandomAccess()
84 assertTrue(multimap.get("foo") instanceof RandomAccess); in testGetRandomAccess()
85 assertTrue(multimap.get("bar") instanceof RandomAccess); in testGetRandomAccess()
90 Multimap<String, Integer> multimap = create(); in testRemoveAllRandomAccess() local
91 multimap.put("foo", 1); in testRemoveAllRandomAccess()
[all …]
DImmutableSetMultimapTest.java90 ImmutableSetMultimap<String, Integer> multimap = in testBuilder_withImmutableEntry() local
92 assertEquals(ImmutableSet.of(1), multimap.get("one")); in testBuilder_withImmutableEntry()
140 Multimap<String, Integer> multimap = builder.build(); in testBuilderPutAllIterable() local
141 assertEquals(ImmutableSet.of(1, 2, 3, 6, 7), multimap.get("foo")); in testBuilderPutAllIterable()
142 assertEquals(ImmutableSet.of(4, 5), multimap.get("bar")); in testBuilderPutAllIterable()
143 assertEquals(7, multimap.size()); in testBuilderPutAllIterable()
151 Multimap<String, Integer> multimap = builder.build(); in testBuilderPutAllVarargs() local
152 assertEquals(ImmutableSet.of(1, 2, 3, 6, 7), multimap.get("foo")); in testBuilderPutAllVarargs()
153 assertEquals(ImmutableSet.of(4, 5), multimap.get("bar")); in testBuilderPutAllVarargs()
154 assertEquals(7, multimap.size()); in testBuilderPutAllVarargs()
[all …]
DTreeMultimapExplicitTest.java73 TreeMultimap<String, Integer> multimap = in createPopulate() local
75 multimap.put("google", 2); in createPopulate()
76 multimap.put("google", 6); in createPopulate()
77 multimap.put(null, 3); in createPopulate()
78 multimap.put(null, 1); in createPopulate()
79 multimap.put(null, 7); in createPopulate()
80 multimap.put("tree", 0); in createPopulate()
81 multimap.put("tree", null); in createPopulate()
82 return multimap; in createPopulate()
106 Multimap<String, Integer> multimap = create(); in testToString() local
[all …]
DLinkedListMultimapTest.java67 ListMultimap<String, String> multimap = LinkedListMultimap.create(); in suite()
69 multimap.put(entry.getKey(), entry.getValue()); in suite()
71 return multimap; in suite()
95 Multimap<String, Integer> multimap = create(); in testGetRandomAccess() local
96 multimap.put("foo", 1); in testGetRandomAccess()
97 multimap.put("foo", 3); in testGetRandomAccess()
98 assertFalse(multimap.get("foo") instanceof RandomAccess); in testGetRandomAccess()
99 assertFalse(multimap.get("bar") instanceof RandomAccess); in testGetRandomAccess()
107 Multimap<String, Integer> multimap = create(); in testRemoveAllRandomAccess() local
108 multimap.put("foo", 1); in testRemoveAllRandomAccess()
[all …]
DImmutableListMultimapTest.java90 ImmutableListMultimap<String, Integer> multimap = in testBuilder_withImmutableEntry() local
92 assertEquals(Arrays.asList(1), multimap.get("one")); in testBuilder_withImmutableEntry()
140 Multimap<String, Integer> multimap = builder.build(); in testBuilderPutAllIterable() local
141 assertEquals(Arrays.asList(1, 2, 3, 6, 7), multimap.get("foo")); in testBuilderPutAllIterable()
142 assertEquals(Arrays.asList(4, 5), multimap.get("bar")); in testBuilderPutAllIterable()
143 assertEquals(7, multimap.size()); in testBuilderPutAllIterable()
151 Multimap<String, Integer> multimap = builder.build(); in testBuilderPutAllVarargs() local
152 assertEquals(Arrays.asList(1, 2, 3, 6, 7), multimap.get("foo")); in testBuilderPutAllVarargs()
153 assertEquals(Arrays.asList(4, 5), multimap.get("bar")); in testBuilderPutAllVarargs()
154 assertEquals(7, multimap.size()); in testBuilderPutAllVarargs()
[all …]
DTreeMultimapNaturalTest.java71 SetMultimap<String, String> multimap = in suite()
75 multimap.put(entry.getKey(), entry.getValue()); in suite()
77 return multimap; in suite()
112 TreeMultimap<String, Integer> multimap = in suite()
115 multimap.put(elements[i], i); in suite()
117 return multimap.keySet(); in suite()
180 TreeMultimap<String, String> multimap = TreeMultimap.create(); in suite()
185 checkArgument(!multimap.containsKey(entry.getKey())); in suite()
186 multimap.putAll(entry.getKey(), entry.getValue()); in suite()
188 return multimap.asMap(); in suite()
[all …]
DMultimapsTest.java182 ListMultimap<String, Integer> multimap = Multimaps.unmodifiableListMultimap(delegate); in testUnmodifiableArrayListMultimapRandomAccess() local
183 assertTrue(multimap.get("foo") instanceof RandomAccess); in testUnmodifiableArrayListMultimapRandomAccess()
184 assertTrue(multimap.get("bar") instanceof RandomAccess); in testUnmodifiableArrayListMultimapRandomAccess()
191 ListMultimap<String, Integer> multimap = Multimaps.unmodifiableListMultimap(delegate); in testUnmodifiableLinkedListMultimapRandomAccess() local
192 assertFalse(multimap.get("foo") instanceof RandomAccess); in testUnmodifiableLinkedListMultimapRandomAccess()
193 assertFalse(multimap.get("bar") instanceof RandomAccess); in testUnmodifiableLinkedListMultimapRandomAccess()
258 SortedSetMultimap<String, Integer> multimap = Multimaps.synchronizedSortedSetMultimap(delegate); in testUnmodifiableSynchronizedTreeMultimap() local
259 checkUnmodifiableMultimap(multimap, false, "null", 42); in testUnmodifiableSynchronizedTreeMultimap()
260 assertSame(INT_COMPARATOR, multimap.valueComparator()); in testUnmodifiableSynchronizedTreeMultimap()
267 SortedSetMultimap<String, Integer> multimap = Multimaps.synchronizedSortedSetMultimap(delegate); in testSerializingUnmodifiableSynchronizedTreeMultimap() local
[all …]
DMultimapsCollectionTest.java100 static void populateMultimapForGet(Multimap<Integer, String> multimap, String[] elements) { in populateMultimapForGet() argument
101 multimap.put(2, "foo"); in populateMultimapForGet()
103 multimap.put(3, element); in populateMultimapForGet()
107 static void populateMultimapForKeySet(Multimap<String, Integer> multimap, String[] elements) { in populateMultimapForKeySet() argument
109 multimap.put(element, 2); in populateMultimapForKeySet()
110 multimap.put(element, 3); in populateMultimapForKeySet()
114 static void populateMultimapForValues(Multimap<Integer, String> multimap, String[] elements) { in populateMultimapForValues() argument
116 multimap.put(i % 2, elements[i]); in populateMultimapForValues()
120 static void populateMultimapForKeys(Multimap<String, Integer> multimap, String[] elements) { in populateMultimapForKeys() argument
122 multimap.put(elements[i], i); in populateMultimapForKeys()
[all …]
DHashMultimapTest.java47 SetMultimap<String, String> multimap = HashMultimap.create(); in suite()
49 multimap.put(entry.getKey(), entry.getValue()); in suite()
51 return multimap; in suite()
74 HashMultimap<String, Integer> multimap = HashMultimap.create(); in testCreate() local
75 multimap.put("foo", 1); in testCreate()
76 multimap.put("bar", 2); in testCreate()
77 multimap.put("foo", 3); in testCreate()
78 assertEquals(ImmutableSet.of(1, 3), multimap.get("foo")); in testCreate()
79 assertEquals(2, multimap.expectedValuesPerKey); in testCreate()
83 HashMultimap<String, Integer> multimap = HashMultimap.create(); in testCreateFromMultimap() local
[all …]
/external/guava/guava-testlib/src/com/google/common/collect/testing/google/
DUnmodifiableCollectionTests.java267 Multimap<K, V> multimap, final K sampleKey, final V sampleValue) { in assertMultimapIsUnmodifiable() argument
269 Collections.unmodifiableList(Lists.newArrayList(multimap.entries())); in assertMultimapIsUnmodifiable()
271 assertMultimapRemainsUnmodified(multimap, originalEntries); in assertMultimapIsUnmodifiable()
277 multimap.clear(); in assertMultimapIsUnmodifiable()
282 assertMultimapRemainsUnmodified(multimap, originalEntries); in assertMultimapIsUnmodifiable()
286 multimap.asMap().entrySet(), Maps.immutableEntry(sampleKey, sampleValueAsCollection)); in assertMultimapIsUnmodifiable()
290 assertMultimapRemainsUnmodified(multimap, originalEntries); in assertMultimapIsUnmodifiable()
291 if (!multimap.isEmpty()) { in assertMultimapIsUnmodifiable()
292 Collection<V> values = multimap.asMap().entrySet().iterator().next().getValue(); in assertMultimapIsUnmodifiable()
298 assertCollectionIsUnmodifiable(multimap.entries(), Maps.immutableEntry(sampleKey, sampleValue)); in assertMultimapIsUnmodifiable()
[all …]
DMultimapClearTester.java45 multimap().clear(); in testClearUnsupported()
52 assertEquals(0, multimap().size()); in assertCleared()
53 assertEmpty(multimap()); in assertCleared()
54 assertEquals(multimap(), getSubjectGenerator().create()); in assertCleared()
55 assertEmpty(multimap().entries()); in assertCleared()
56 assertEmpty(multimap().asMap()); in assertCleared()
57 assertEmpty(multimap().keySet()); in assertCleared()
58 assertEmpty(multimap().keys()); in assertCleared()
59 assertEmpty(multimap().values()); in assertCleared()
67 multimap().clear(); in testClear()
[all …]
/external/guava/android/guava-testlib/src/com/google/common/collect/testing/google/
DUnmodifiableCollectionTests.java267 Multimap<K, V> multimap, final K sampleKey, final V sampleValue) { in assertMultimapIsUnmodifiable() argument
269 Collections.unmodifiableList(Lists.newArrayList(multimap.entries())); in assertMultimapIsUnmodifiable()
271 assertMultimapRemainsUnmodified(multimap, originalEntries); in assertMultimapIsUnmodifiable()
277 multimap.clear(); in assertMultimapIsUnmodifiable()
282 assertMultimapRemainsUnmodified(multimap, originalEntries); in assertMultimapIsUnmodifiable()
286 multimap.asMap().entrySet(), Maps.immutableEntry(sampleKey, sampleValueAsCollection)); in assertMultimapIsUnmodifiable()
290 assertMultimapRemainsUnmodified(multimap, originalEntries); in assertMultimapIsUnmodifiable()
291 if (!multimap.isEmpty()) { in assertMultimapIsUnmodifiable()
292 Collection<V> values = multimap.asMap().entrySet().iterator().next().getValue(); in assertMultimapIsUnmodifiable()
298 assertCollectionIsUnmodifiable(multimap.entries(), Maps.immutableEntry(sampleKey, sampleValue)); in assertMultimapIsUnmodifiable()
[all …]
DMultimapClearTester.java45 multimap().clear(); in testClearUnsupported()
52 assertEquals(0, multimap().size()); in assertCleared()
53 assertEmpty(multimap()); in assertCleared()
54 assertEquals(multimap(), getSubjectGenerator().create()); in assertCleared()
55 assertEmpty(multimap().entries()); in assertCleared()
56 assertEmpty(multimap().asMap()); in assertCleared()
57 assertEmpty(multimap().keySet()); in assertCleared()
58 assertEmpty(multimap().keys()); in assertCleared()
59 assertEmpty(multimap().values()); in assertCleared()
67 multimap().clear(); in testClear()
[all …]
DMultimapPutTester.java51 multimap().put(k3(), v3()); in testPutUnsupported()
63 assertTrue(multimap().put(k3(), v3())); in testPutEmpty()
66 assertEquals(size + 1, multimap().size()); in testPutEmpty()
76 assertTrue(multimap().put(k0(), v3())); in testPutPresent()
79 assertEquals(size + 1, multimap().size()); in testPutPresent()
86 List<V> values = Helpers.copyToList(multimap().get(k0())); in testPutTwoElements()
88 assertTrue(multimap().put(k0(), v1())); in testPutTwoElements()
89 assertTrue(multimap().put(k0(), v2())); in testPutTwoElements()
95 assertEquals(size + 2, multimap().size()); in testPutTwoElements()
102 multimap().put(k3(), null); in testPutNullValue_supported()
[all …]

12345678910>>...14