Searched defs:multimap (Results 1 - 25 of 58) sorted by relevance

123

/external/guava/guava/src/com/google/common/collect/
H A DFilteredMultimapValues.java39 private final FilteredMultimap<K, V> multimap; field in class:FilteredMultimapValues
41 FilteredMultimapValues(FilteredMultimap<K, V> multimap) { argument
42 this.multimap = checkNotNull(multimap);
47 return Maps.valueIterator(multimap.entries().iterator());
52 return multimap.containsValue(o);
57 return multimap.size();
62 Predicate<? super Entry<K, V>> entryPredicate = multimap.entryPredicate();
63 for (Iterator<Entry<K, V>> unfilteredItr = multimap.unfiltered().entries().iterator();
76 return Iterables.removeIf(multimap
[all...]
H A DHashMultimap.java35 * <p>The multimap does not store duplicate key-value pairs. Adding a new
38 * <p>Keys and values may be null. All optional multimap methods are supported,
42 * multimap. Concurrent read operations will work correctly. To allow concurrent
43 * update operations, wrap your multimap with a call to {@link
80 * multimap. If a key-value mapping appears multiple times in the input
81 * multimap, it only appears once in the constructed multimap.
83 * @param multimap the multimap whose contents are copied to this multimap
85 create( Multimap<? extends K, ? extends V> multimap) argument
100 HashMultimap(Multimap<? extends K, ? extends V> multimap) argument
[all...]
H A DArrayListMultimap.java43 * <p>This multimap allows duplicate key-value pairs. After adding a new
48 * <p>Keys and values may be null. All optional multimap methods are supported,
55 * multimap. Concurrent read operations will work correctly. To allow concurrent
56 * update operations, wrap your multimap with a call to {@link
97 * specified multimap.
99 * @param multimap the multimap whose contents are copied to this multimap
102 Multimap<? extends K, ? extends V> multimap) {
103 return new ArrayListMultimap<K, V>(multimap);
101 create( Multimap<? extends K, ? extends V> multimap) argument
117 ArrayListMultimap(Multimap<? extends K, ? extends V> multimap) argument
[all...]
H A DSerialization.java38 * Reads a count corresponding to a serialized map, multiset, or multimap. It
43 * keys in a multimap serialized by {@link
142 * Stores the contents of a multimap in an output stream, as part of
152 Multimap<K, V> multimap, ObjectOutputStream stream) throws IOException {
153 stream.writeInt(multimap.asMap().size());
154 for (Map.Entry<K, Collection<V>> entry : multimap.asMap().entrySet()) {
164 * Populates a multimap by reading an input stream, as part of
168 Multimap<K, V> multimap, ObjectInputStream stream)
171 populateMultimap(multimap, stream, distinctKeys);
175 * Populates a multimap b
151 writeMultimap( Multimap<K, V> multimap, ObjectOutputStream stream) argument
167 populateMultimap( Multimap<K, V> multimap, ObjectInputStream stream) argument
179 populateMultimap( Multimap<K, V> multimap, ObjectInputStream stream, int distinctKeys) argument
[all...]
H A DTreeMultimap.java58 * <p>The multimap does not store duplicate key-value pairs. Adding a new
62 * respective comparators support them). All optional multimap methods are
66 * multimap. Concurrent read operations will work correctly. To allow concurrent
67 * update operations, wrap your multimap with a call to {@link
109 * keys and values, with the same mappings as the specified multimap.
111 * @param multimap the multimap whose contents are copied to this multimap
114 TreeMultimap<K, V> create(Multimap<? extends K, ? extends V> multimap) { argument
116 multimap);
126 TreeMultimap(Comparator<? super K> keyComparator, Comparator<? super V> valueComparator, Multimap<? extends K, ? extends V> multimap) argument
[all...]
H A DForwardingMultimap.java29 * A multimap which forwards all its method calls to another multimap.
31 * the backing multimap as desired per the <a
107 public boolean putAll(Multimap<? extends K, ? extends V> multimap) { argument
108 return delegate().putAll(multimap);
H A DMultimap.java31 * contents of a multimap either as a map from keys to <i>nonempty</i>
49 * based on the <i>second</i> form. So, using the multimap shown above as an
52 * those times when the first style is more useful, use the multimap's {@link
59 * ListMultimap<String, String> multimap = ArrayListMultimap.create();
61 * multimap.put(pres.firstName(), pres.lastName());
63 * for (String firstName : multimap.keySet()) {
64 * List<String> lastNames = multimap.get(firstName);
78 * <p>Much of the power of the multimap API comes from the <i>view
80 * multimap itself. When they support modification, the changes are
81 * <i>write-through</i> (they automatically update the backing multimap)
250 putAll(Multimap<? extends K, ? extends V> multimap) argument
[all...]
H A DMultimapBuilder.java45 * A builder for a multimap implementation that allows customization of the backing map and value
46 * collection implementations used in a particular multimap.
48 * <p>This can be used to easily configure multimap data structure implementations not provided
65 * @param <K0> An upper bound on the key type of the generated multimap.
66 * @param <V0> An upper bound on the value type of the generated multimap.
109 * to the multimap, save that if all values associated with a key are removed and then the key is
110 * added back into the multimap, that key will come last in the key iteration order.
122 * to the multimap, save that if all values associated with a key are removed and then the key is
123 * added back into the multimap, that key will come last in the key iteration order.
276 * @param <K0> The upper bound on the key type of the generated multimap
431 build( Multimap<? extends K, ? extends V> multimap) argument
448 build( Multimap<? extends K, ? extends V> multimap) argument
464 build( Multimap<? extends K, ? extends V> multimap) argument
480 build( Multimap<? extends K, ? extends V> multimap) argument
[all...]
/external/guava/guava-gwt/src/com/google/common/collect/
H A DArrayListMultimap_CustomFieldSerializer.java42 ArrayListMultimap<?, ?> multimap) throws SerializationException {
43 Multimap_CustomFieldSerializerBase.serialize(out, multimap);
41 serialize(SerializationStreamWriter out, ArrayListMultimap<?, ?> multimap) argument
H A DHashMultimap_CustomFieldSerializer.java42 HashMultimap<?, ?> multimap) throws SerializationException {
43 Multimap_CustomFieldSerializerBase.serialize(out, multimap);
41 serialize(SerializationStreamWriter out, HashMultimap<?, ?> multimap) argument
H A DLinkedHashMultimap_CustomFieldSerializer.java40 LinkedHashMultimap<Object, Object> multimap = LinkedHashMultimap.create();
42 multimap.valueSetCapacity = stream.readInt();
48 map.put(key, multimap.createCollection(key));
56 multimap.setMap(map);
58 return multimap;
62 LinkedHashMultimap<?, ?> multimap) throws SerializationException {
63 stream.writeInt(multimap.valueSetCapacity);
64 stream.writeInt(multimap.keySet().size());
65 for (Object key : multimap.keySet()) {
68 stream.writeInt(multimap
61 serialize(SerializationStreamWriter stream, LinkedHashMultimap<?, ?> multimap) argument
[all...]
H A DLinkedListMultimap_CustomFieldSerializer.java38 LinkedListMultimap<Object, Object> multimap = LinkedListMultimap.create();
43 multimap.put(key, value);
45 return multimap;
49 LinkedListMultimap<?, ?> multimap) throws SerializationException {
50 out.writeInt(multimap.size());
51 for (Map.Entry<?, ?> entry : multimap.entries()) {
48 serialize(SerializationStreamWriter out, LinkedListMultimap<?, ?> multimap) argument
H A DMultimap_CustomFieldSerializerBase.java54 SerializationStreamReader reader, Multimap<Object, Object> multimap)
62 multimap.put(key, value);
65 return multimap;
53 populate( SerializationStreamReader reader, Multimap<Object, Object> multimap) argument
H A DTreeMultimap_CustomFieldSerializer.java48 TreeMultimap<?, ?> multimap) throws SerializationException {
49 out.writeObject(multimap.keyComparator());
50 out.writeObject(multimap.valueComparator());
51 Multimap_CustomFieldSerializerBase.serialize(out, multimap);
47 serialize(SerializationStreamWriter out, TreeMultimap<?, ?> multimap) argument
/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
H A DArrayListMultimap.java38 * <p>This multimap allows duplicate key-value pairs. After adding a new
43 * <p>Keys and values may be null. All optional multimap methods are supported,
50 * multimap. Concurrent read operations will work correctly. To allow concurrent
51 * update operations, wrap your multimap with a call to {@link
92 * specified multimap.
94 * @param multimap the multimap whose contents are copied to this multimap
97 Multimap<? extends K, ? extends V> multimap) {
98 return new ArrayListMultimap<K, V>(multimap);
96 create( Multimap<? extends K, ? extends V> multimap) argument
112 ArrayListMultimap(Multimap<? extends K, ? extends V> multimap) argument
[all...]
H A DHashMultimap.java30 * <p>The multimap does not store duplicate key-value pairs. Adding a new
33 * <p>Keys and values may be null. All optional multimap methods are supported,
37 * multimap. Concurrent read operations will work correctly. To allow concurrent
38 * update operations, wrap your multimap with a call to {@link
75 * multimap. If a key-value mapping appears multiple times in the input
76 * multimap, it only appears once in the constructed multimap.
78 * @param multimap the multimap whose contents are copied to this multimap
80 create( Multimap<? extends K, ? extends V> multimap) argument
95 HashMultimap(Multimap<? extends K, ? extends V> multimap) argument
[all...]
H A DTreeMultimap.java52 * <p>The multimap does not store duplicate key-value pairs. Adding a new
56 * respective comparators support them). All optional multimap methods are
60 * multimap. Concurrent read operations will work correctly. To allow concurrent
61 * update operations, wrap your multimap with a call to {@link
103 * keys and values, with the same mappings as the specified multimap.
105 * @param multimap the multimap whose contents are copied to this multimap
108 TreeMultimap<K, V> create(Multimap<? extends K, ? extends V> multimap) { argument
110 multimap);
120 TreeMultimap(Comparator<? super K> keyComparator, Comparator<? super V> valueComparator, Multimap<? extends K, ? extends V> multimap) argument
[all...]
H A DImmutableListMultimap.java32 * a <i>view</i> of a separate multimap which can still change, an instance of
36 * you easily make a "defensive copy" of a multimap provided to your class by
55 /** Returns the empty multimap. */
56 // Casting is safe because the multimap will never hold any elements.
63 * Returns an immutable multimap containing a single entry.
73 * Returns an immutable multimap containing the given entries, in order.
84 * Returns an immutable multimap containing the given entries, in order.
97 * Returns an immutable multimap containing the given entries, in order.
111 * Returns an immutable multimap containing the given entries, in order.
148 * times to build multiple multimaps in series. Each multimap contain
187 putAll( Multimap<? extends K, ? extends V> multimap) argument
235 copyOf( Multimap<? extends K, ? extends V> multimap) argument
[all...]
/external/guava/guava-tests/test/com/google/common/collect/
H A DAbstractMultimapAsMapImplementsMapTest.java26 * Test {@link Multimap#asMap()} for an arbitrary multimap with
41 protected void populate(Multimap<String, Integer> multimap) { argument
42 multimap.put("one", 1);
43 multimap.put("two", 2);
44 multimap.put("two", 22);
45 multimap.put("three", 3);
46 multimap.put("three", 33);
47 multimap.put("three", 333);
H A DLinkedHashMultimapTest.java64 SetMultimap<String, String> multimap = LinkedHashMultimap.create();
66 multimap.put(entry.getKey(), entry.getValue());
68 return multimap;
88 LinkedHashMultimap<String, Integer> multimap = LinkedHashMultimap.create();
90 multimap.put("a", z);
94 (LinkedHashMultimap.ValueSet) multimap.backingMap().get("a");
102 Multimap<String, Integer> multimap = LinkedHashMultimap.create();
103 multimap.put("foo", 5);
104 multimap.put("bar", 4);
105 multimap
162 assertOrderingReadOnly(Multimap<String, Integer> multimap) argument
[all...]
/external/caliper/caliper/src/main/java/com/google/caliper/runner/
H A DFullCartesianExperimentSelector.java87 protected static <T> Set<List<T>> cartesian(SetMultimap<String, T> multimap) { argument
89 ImmutableMap<String, Set<T>> paramsAsMap = (ImmutableMap) multimap.asMap();
/external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/
H A DLinkedHashMultimapTest.java41 LinkedHashMultimap<String, Integer> multimap = LinkedHashMultimap.create();
43 multimap.put("a", z);
47 (LinkedHashMultimap.ValueSet) multimap.backingMap().get("a");
55 Multimap<String, Integer> multimap = LinkedHashMultimap.create();
56 multimap.put("foo", 5);
57 multimap.put("bar", 4);
58 multimap.put("foo", 3);
59 multimap.put("cow", 2);
60 multimap.put("bar", 1);
61 return multimap;
90 assertOrderingReadOnly(Multimap<String, Integer> multimap) argument
[all...]
H A DImmutableSetMultimapTest.java41 ImmutableSetMultimap<String, Integer> multimap = new Builder<String, Integer>()
44 assertEquals(ImmutableSet.of(1), multimap.get("one"));
90 Multimap<String, Integer> multimap = builder.build();
91 assertEquals(ImmutableSet.of(1, 2, 3, 6, 7), multimap.get("foo"));
92 assertEquals(ImmutableSet.of(4, 5), multimap.get("bar"));
93 assertEquals(7, multimap.size());
102 Multimap<String, Integer> multimap = builder.build();
103 assertEquals(ImmutableSet.of(1, 2, 3, 6, 7), multimap.get("foo"));
104 assertEquals(ImmutableSet.of(4, 5), multimap.get("bar"));
105 assertEquals(7, multimap
464 assertMultimapEquals(Multimap<K, V> multimap, Object... alternatingKeysAndValues) argument
[all...]
/external/guava/guava-testlib/src/com/google/common/collect/testing/google/
H A DAbstractMultimapTester.java42 private M multimap; field in class:AbstractMultimapTester
44 protected M multimap() { method in class:AbstractMultimapTester
45 return multimap;
123 return multimap.entries();
129 multimap = super.resetContainer(newContents);
130 return multimap;
134 multimap = super.resetContainer(getSubjectGenerator().create(newContents));
135 return multimap;
148 assertThat(multimap().get(key)).has().exactlyAs(values);
151 assertThat(multimap()
[all...]
H A DUnmodifiableCollectionTests.java251 * Verifies that a multimap is immutable.
253 * <p>A multimap is considered immutable if:
258 * multimap throw UnsupportedOperationException when those mutators
261 * @param multimap the presumed-immutable multimap
263 * {@code multimap}. {@code multimap} may or may not have {@code sampleKey} as
266 * {@code multimap}. {@code multimap} may or may not have {@code sampleValue}
270 Multimap<K, V> multimap, fina
269 assertMultimapIsUnmodifiable( Multimap<K, V> multimap, final K sampleKey, final V sampleValue) argument
[all...]

Completed in 389 milliseconds

123