private static class Multimaps.CustomMultimap<K,V> extends AbstractMapBasedMultimap<K,V>
AbstractMapBasedMultimap.NavigableAsMap, AbstractMapBasedMultimap.NavigableKeySet, AbstractMapBasedMultimap.WrappedNavigableSet
AbstractMultimap.Values
Modifier and Type | Field and Description |
---|---|
(package private) Supplier<? extends java.util.Collection<V>> |
factory |
private static long |
serialVersionUID |
Constructor and Description |
---|
CustomMultimap(java.util.Map<K,java.util.Collection<V>> map,
Supplier<? extends java.util.Collection<V>> factory) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Collection<V> |
createCollection()
Creates the collection of values for a single key.
|
private void |
readObject(java.io.ObjectInputStream stream) |
private void |
writeObject(java.io.ObjectOutputStream stream) |
backingMap, clear, containsKey, createAsMap, createCollection, createKeySet, createUnmodifiableEmptyCollection, entries, entryIterator, get, put, removeAll, replaceValues, setMap, size, unmodifiableCollectionSubclass, valueIterator, values, wrapCollection
asMap, containsEntry, containsValue, createEntries, createKeys, createValues, equals, hashCode, isEmpty, keys, keySet, putAll, putAll, remove, toString
@GwtIncompatible private static final long serialVersionUID
protected java.util.Collection<V> createCollection()
AbstractMapBasedMultimap
Collections 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 AbstractMapBasedMultimap<K,V>
@GwtIncompatible private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOException
java.io.IOException
@GwtIncompatible private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException