private static class Multimaps.CustomSetMultimap<K,V> extends AbstractSetMultimap<K,V>
AbstractMapBasedMultimap.NavigableAsMap, AbstractMapBasedMultimap.NavigableKeySet, AbstractMapBasedMultimap.WrappedCollection, AbstractMapBasedMultimap.WrappedList, AbstractMapBasedMultimap.WrappedNavigableSet, AbstractMapBasedMultimap.WrappedSet, AbstractMapBasedMultimap.WrappedSortedSetAbstractMultimap.Entries, AbstractMultimap.EntrySet, AbstractMultimap.Values| Modifier and Type | Field and Description |
|---|---|
(package private) Supplier<? extends java.util.Set<V>> |
factory |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
CustomSetMultimap(java.util.Map<K,java.util.Collection<V>> map,
Supplier<? extends java.util.Set<V>> factory) |
| Modifier and Type | Method and Description |
|---|---|
(package private) java.util.Map<K,java.util.Collection<V>> |
createAsMap() |
protected java.util.Set<V> |
createCollection()
Creates the collection of values for a single key.
|
(package private) java.util.Set<K> |
createKeySet() |
private void |
readObject(java.io.ObjectInputStream stream) |
(package private) <E> java.util.Collection<E> |
unmodifiableCollectionSubclass(java.util.Collection<E> collection) |
(package private) java.util.Collection<V> |
wrapCollection(K key,
java.util.Collection<V> collection)
Generates a decorated collection that remains consistent with the values in the multimap for
the provided key.
|
private void |
writeObject(java.io.ObjectOutputStream stream) |
asMap, createUnmodifiableEmptyCollection, entries, equals, get, put, removeAll, replaceValuesbackingMap, clear, containsKey, createCollection, createEntries, createKeys, createMaybeNavigableAsMap, createMaybeNavigableKeySet, createValues, entryIterator, entrySpliterator, forEach, setMap, size, valueIterator, values, valueSpliterator, wrapListcontainsEntry, containsValue, hashCode, isEmpty, keys, keySet, putAll, putAll, remove, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitclear, containsEntry, containsKey, containsValue, forEach, hashCode, isEmpty, keys, keySet, putAll, putAll, remove, size, valuesprivate static final long serialVersionUID
java.util.Set<K> createKeySet()
createKeySet in class AbstractMapBasedMultimap<K,V>java.util.Map<K,java.util.Collection<V>> createAsMap()
createAsMap in class AbstractMapBasedMultimap<K,V>protected java.util.Set<V> createCollection()
AbstractMapBasedMultimapCollections with weak, soft, or phantom references are not supported. Each call to createCollection should create a new instance.
The returned collection class determines whether duplicate key-value pairs are allowed.
createCollection in class AbstractSetMultimap<K,V><E> java.util.Collection<E> unmodifiableCollectionSubclass(java.util.Collection<E> collection)
unmodifiableCollectionSubclass in class AbstractSetMultimap<K,V>java.util.Collection<V> wrapCollection(K key, java.util.Collection<V> collection)
AbstractMapBasedMultimapwrapCollection in class AbstractSetMultimap<K,V>private void writeObject(java.io.ObjectOutputStream stream)
throws java.io.IOException
java.io.IOExceptionprivate void readObject(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.ClassNotFoundException