Lines Matching defs:multimap

42  * a <i>view</i> of a separate multimap which can still change, an instance of
46 * you easily make a "defensive copy" of a multimap provided to your class by
64 /** Returns an empty multimap. */
70 * Returns an immutable multimap containing a single entry.
77 * Returns an immutable multimap containing the given entries, in order.
84 * Returns an immutable multimap containing the given entries, in order.
92 * Returns an immutable multimap containing the given entries, in order.
100 * Returns an immutable multimap containing the given entries, in order.
139 Comparator<? super K> keyComparator, Multimap<K, V> multimap) {
141 putAll(multimap);
150 * A builder for creating immutable multimap instances, especially
162 * times to build multiple multimaps in series. Each multimap contains the
178 * Adds a key-value mapping to the built multimap.
186 * Adds an entry to the built multimap.
197 * Stores a collection of values with the same key in the built multimap.
212 * Stores an array of values with the same key in the built multimap.
222 * Stores another multimap's entries in the built multimap. The generated
223 * multimap's key and value orderings correspond to the iteration ordering
224 * of the {@code multimap.asMap()} view, with new keys and values following
227 * @throws NullPointerException if any key or value in {@code multimap} is
230 public Builder<K, V> putAll(Multimap<? extends K, ? extends V> multimap) {
232 : multimap.asMap().entrySet()) {
239 * Specifies the ordering of the generated multimap's keys.
251 * Specifies the ordering of the generated multimap's values for each key.
262 * Returns a newly-created immutable multimap.
276 * Returns an immutable multimap containing the same mappings as {@code
277 * multimap}. The generated multimap's key and value orderings correspond to
278 * the iteration ordering of the {@code multimap.asMap()} view.
284 * @throws NullPointerException if any key or value in {@code multimap} is
288 Multimap<? extends K, ? extends V> multimap) {
289 if (multimap instanceof ImmutableMultimap) {
290 @SuppressWarnings("unchecked") // safe since multimap is not writable
292 = (ImmutableMultimap<K, V>) multimap;
297 return ImmutableListMultimap.copyOf(multimap);
325 * Guaranteed to throw an exception and leave the multimap unmodified.
335 * Guaranteed to throw an exception and leave the multimap unmodified.
346 * Guaranteed to throw an exception and leave the multimap unmodified.
357 * mappings in the multimap have the provided key, an empty immutable
359 * used to build this multimap.
365 * Returns an immutable multimap which is the inverse of this one. For every
375 * Guaranteed to throw an exception and leave the multimap unmodified.
385 * Guaranteed to throw an exception and leave the multimap unmodified.
395 * Guaranteed to throw an exception and leave the multimap unmodified.
400 public boolean putAll(Multimap<? extends K, ? extends V> multimap) {
405 * Guaranteed to throw an exception and leave the multimap unmodified.
470 * Returns an immutable set of the distinct keys in this multimap. These keys
472 * of this multimap.
481 * values in the multimap.
492 * Returns an immutable collection of all key-value pairs in the multimap. Its
505 final ImmutableMultimap<K, V> multimap;
507 EntryCollection(ImmutableMultimap<K, V> multimap) {
508 this.multimap = multimap;
513 mapIterator = this.multimap.map.entrySet().iterator();
539 return multimap.isPartialView();
544 return multimap.size();
550 return multimap.containsEntry(entry.getKey(), entry.getValue());
563 * mappings the key has in the multimap. Duplicate keys appear consecutively
584 * Returns an immutable collection of the values in this multimap. Its
595 final ImmutableMultimap<?, V> multimap;
597 Values(ImmutableMultimap<?, V> multimap) {
598 this.multimap = multimap;
603 = multimap.entries().iterator();
618 return multimap.size();