Package com.google.common.collect
Class Multimaps.CustomMultimap<K,V>
- java.lang.Object
-
- com.google.common.collect.AbstractMultimap<K,V>
-
- com.google.common.collect.AbstractMapBasedMultimap<K,V>
-
- com.google.common.collect.Multimaps.CustomMultimap<K,V>
-
- All Implemented Interfaces:
Multimap<K,V>,java.io.Serializable
- Enclosing class:
- Multimaps
private static class Multimaps.CustomMultimap<K,V> extends AbstractMapBasedMultimap<K,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.collect.AbstractMapBasedMultimap
AbstractMapBasedMultimap.NavigableAsMap, AbstractMapBasedMultimap.NavigableKeySet, AbstractMapBasedMultimap.WrappedNavigableSet
-
Nested classes/interfaces inherited from class com.google.common.collect.AbstractMultimap
AbstractMultimap.Values
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Supplier<? extends java.util.Collection<V>>factoryprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description CustomMultimap(java.util.Map<K,java.util.Collection<V>> map, Supplier<? extends java.util.Collection<V>> factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Collection<V>createCollection()Creates the collection of values for a single key.private voidreadObject(java.io.ObjectInputStream stream)private voidwriteObject(java.io.ObjectOutputStream stream)-
Methods inherited from class com.google.common.collect.AbstractMapBasedMultimap
backingMap, clear, containsKey, createAsMap, createCollection, createKeySet, createUnmodifiableEmptyCollection, entries, entryIterator, get, put, removeAll, replaceValues, setMap, size, unmodifiableCollectionSubclass, valueIterator, values, wrapCollection
-
Methods inherited from class com.google.common.collect.AbstractMultimap
asMap, containsEntry, containsValue, createEntries, createKeys, createValues, equals, hashCode, isEmpty, keys, keySet, putAll, putAll, remove, toString
-
-
-
-
Field Detail
-
serialVersionUID
@GwtIncompatible private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
createCollection
protected java.util.Collection<V> createCollection()
Description copied from class:AbstractMapBasedMultimapCreates the collection of values for a single key.Collections with weak, soft, or phantom references are not supported. Each call to
createCollectionshould create a new instance.The returned collection class determines whether duplicate key-value pairs are allowed.
- Specified by:
createCollectionin classAbstractMapBasedMultimap<K,V>- Returns:
- an empty collection of values
-
writeObject
@GwtIncompatible private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOException
- Throws:
java.io.IOException
-
readObject
@GwtIncompatible private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-