Lines Matching defs:multimap

35  * a <i>view</i> of a separate multimap which can still change, an instance of
39 * you easily make a "defensive copy" of a multimap provided to your class by
53 /** Returns an empty multimap. */
59 * Returns an immutable multimap containing a single entry.
66 * Returns an immutable multimap containing the given entries, in order.
73 * Returns an immutable multimap containing the given entries, in order.
81 * Returns an immutable multimap containing the given entries, in order.
89 * Returns an immutable multimap containing the given entries, in order.
122 * A builder for creating immutable multimap instances, especially
134 * multiple times to build multiple multimaps in series. Each multimap
147 * Adds a key-value mapping to the built multimap.
155 * Stores a collection of values with the same key in the built multimap.
170 * Stores an array of values with the same key in the built multimap.
180 * Stores another multimap's entries in the built multimap. The generated
181 * multimap's key and value orderings correspond to the iteration ordering
182 * of the {@code multimap.asMap()} view, with new keys and values following
185 * @throws NullPointerException if any key or value in {@code multimap} is
188 public Builder<K, V> putAll(Multimap<? extends K, ? extends V> multimap) {
190 : multimap.asMap().entrySet()) {
197 * Returns a newly-created immutable multimap.
205 * Returns an immutable multimap containing the same mappings as
206 * {@code multimap}. The generated multimap's key and value orderings
207 * correspond to the iteration ordering of the {@code multimap.asMap()} view.
210 * {@code multimap} is an {@code ImmutableMultimap}, no copy will actually be
211 * performed, and the given multimap itself will be returned.
213 * @throws NullPointerException if any key or value in {@code multimap} is
217 Multimap<? extends K, ? extends V> multimap) {
218 if (multimap instanceof ImmutableMultimap) {
219 @SuppressWarnings("unchecked") // safe since multimap is not writable
221 = (ImmutableMultimap<K, V>) multimap;
224 return ImmutableListMultimap.copyOf(multimap);
256 * Guaranteed to throw an exception and leave the multimap unmodified.
265 * Guaranteed to throw an exception and leave the multimap unmodified.
275 * Guaranteed to throw an exception and leave the multimap unmodified.
285 * mappings in the multimap have the provided key, an empty immutable
287 * used to build this multimap.
292 * Guaranteed to throw an exception and leave the multimap unmodified.
301 * Guaranteed to throw an exception and leave the multimap unmodified.
310 * Guaranteed to throw an exception and leave the multimap unmodified.
314 public boolean putAll(Multimap<? extends K, ? extends V> multimap) {
319 * Guaranteed to throw an exception and leave the multimap unmodified.
374 * Returns an immutable set of the distinct keys in this multimap. These keys
376 * of this multimap.
384 * values in the multimap.
394 * Returns an immutable collection of all key-value pairs in the multimap. Its
406 final ImmutableMultimap<K, V> multimap;
408 EntryCollection(ImmutableMultimap<K, V> multimap) {
409 this.multimap = multimap;
414 mapIterator = this.multimap.map.entrySet().iterator();
438 return multimap.size();
444 return multimap.containsEntry(entry.getKey(), entry.getValue());
457 * mappings the key has in the multimap. Duplicate keys appear consecutively
477 * Returns an immutable collection of the values in this multimap. Its
487 final Multimap<?, V> multimap;
489 Values(Multimap<?, V> multimap) {
490 this.multimap = multimap;
495 = multimap.entries().iterator();
507 return multimap.size();