private static final class Multimaps.TransformedEntriesListMultimap<K,V1,V2> extends Multimaps.TransformedEntriesMultimap<K,V1,V2> implements ListMultimap<K,V2>
AbstractMultimap.Entries, AbstractMultimap.EntrySet, AbstractMultimap.ValuesfromMultimap, transformer| Constructor and Description |
|---|
TransformedEntriesListMultimap(ListMultimap<K,V1> fromMultimap,
Maps.EntryTransformer<? super K,? super V1,V2> transformer) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<V2> |
get(K key)
Returns a view collection of the values associated with
key in this multimap, if any. |
java.util.List<V2> |
removeAll(java.lang.Object key)
Removes all values associated with the key
key. |
java.util.List<V2> |
replaceValues(K key,
java.lang.Iterable<? extends V2> values)
Stores a collection of values with the same key, replacing any existing values for that key.
|
(package private) java.util.List<V2> |
transform(K key,
java.util.Collection<V1> values) |
clear, containsKey, createAsMap, createEntries, createKeys, createKeySet, createValues, entryIterator, isEmpty, put, putAll, putAll, remove, sizeasMap, containsEntry, containsValue, entries, entrySpliterator, equals, hashCode, keys, keySet, toString, valueIterator, values, valueSpliteratorclone, finalize, getClass, notify, notifyAll, wait, wait, waitasMap, equalsTransformedEntriesListMultimap(ListMultimap<K,V1> fromMultimap, Maps.EntryTransformer<? super K,? super V1,V2> transformer)
java.util.List<V2> transform(K key, java.util.Collection<V1> values)
transform in class Multimaps.TransformedEntriesMultimap<K,V1,V2>public java.util.List<V2> get(K key)
Multimapkey in this multimap, if any.
Note that when containsKey(key) is false, this returns an empty collection, not null.
Changes to the returned collection will update the underlying multimap, and vice versa.
public java.util.List<V2> removeAll(@CheckForNull java.lang.Object key)
Multimapkey.
Once this method returns, key will not be mapped to any values, so it will not
appear in Multimap.keySet(), Multimap.asMap(), or any other views.
removeAll in interface ListMultimap<K,V2>removeAll in interface Multimap<K,V2>removeAll in class Multimaps.TransformedEntriesMultimap<K,V1,V2>public java.util.List<V2> replaceValues(K key, java.lang.Iterable<? extends V2> values)
MultimapIf values is empty, this is equivalent to removeAll(key).
replaceValues in interface ListMultimap<K,V2>replaceValues in interface Multimap<K,V2>replaceValues in class Multimaps.TransformedEntriesMultimap<K,V1,V2>