Lines Matching defs:multimap

41  * a <i>view</i> of a separate multimap which can still change, an instance of
45 * you easily make a "defensive copy" of a multimap provided to your class by
63 /** Returns an empty multimap. */
69 * Returns an immutable multimap containing a single entry.
76 * Returns an immutable multimap containing the given entries, in order.
83 * Returns an immutable multimap containing the given entries, in order.
91 * Returns an immutable multimap containing the given entries, in order.
99 * Returns an immutable multimap containing the given entries, in order.
138 Comparator<? super K> keyComparator, Multimap<K, V> multimap) {
140 putAll(multimap);
149 * A builder for creating immutable multimap instances, especially
161 * times to build multiple multimaps in series. Each multimap contains the
177 * Adds a key-value mapping to the built multimap.
185 * Adds an entry to the built multimap.
196 * Stores a collection of values with the same key in the built multimap.
211 * Stores an array of values with the same key in the built multimap.
221 * Stores another multimap's entries in the built multimap. The generated
222 * multimap's key and value orderings correspond to the iteration ordering
223 * of the {@code multimap.asMap()} view, with new keys and values following
226 * @throws NullPointerException if any key or value in {@code multimap} is
229 public Builder<K, V> putAll(Multimap<? extends K, ? extends V> multimap) {
231 : multimap.asMap().entrySet()) {
238 * Specifies the ordering of the generated multimap's keys.
250 * Specifies the ordering of the generated multimap's values for each key.
261 * Returns a newly-created immutable multimap.
275 * Returns an immutable multimap containing the same mappings as {@code
276 * multimap}. The generated multimap's key and value orderings correspond to
277 * the iteration ordering of the {@code multimap.asMap()} view.
283 * @throws NullPointerException if any key or value in {@code multimap} is
287 Multimap<? extends K, ? extends V> multimap) {
288 if (multimap instanceof ImmutableMultimap) {
289 @SuppressWarnings("unchecked") // safe since multimap is not writable
291 = (ImmutableMultimap<K, V>) multimap;
296 return ImmutableListMultimap.copyOf(multimap);
315 * Guaranteed to throw an exception and leave the multimap unmodified.
325 * Guaranteed to throw an exception and leave the multimap unmodified.
336 * Guaranteed to throw an exception and leave the multimap unmodified.
347 * mappings in the multimap have the provided key, an empty immutable
349 * used to build this multimap.
355 * Returns an immutable multimap which is the inverse of this one. For every
365 * Guaranteed to throw an exception and leave the multimap unmodified.
375 * Guaranteed to throw an exception and leave the multimap unmodified.
385 * Guaranteed to throw an exception and leave the multimap unmodified.
390 public boolean putAll(Multimap<? extends K, ? extends V> multimap) {
395 * Guaranteed to throw an exception and leave the multimap unmodified.
460 * Returns an immutable set of the distinct keys in this multimap. These keys
462 * of this multimap.
471 * values in the multimap.
482 * Returns an immutable collection of all key-value pairs in the multimap. Its
495 final ImmutableMultimap<K, V> multimap;
497 EntryCollection(ImmutableMultimap<K, V> multimap) {
498 this.multimap = multimap;
503 mapIterator = this.multimap.map.entrySet().iterator();
529 return multimap.isPartialView();
534 return multimap.size();
540 return multimap.containsEntry(entry.getKey(), entry.getValue());
553 * mappings the key has in the multimap. Duplicate keys appear consecutively
574 * Returns an immutable collection of the values in this multimap. Its
585 final ImmutableMultimap<?, V> multimap;
587 Values(ImmutableMultimap<?, V> multimap) {
588 this.multimap = multimap;
593 = multimap.entries().iterator();
608 return multimap.size();