Package com.google.common.collect
Class Multimaps.CustomSetMultimap<K,V>
- java.lang.Object
-
- com.google.common.collect.AbstractMultimap<K,V>
-
- com.google.common.collect.AbstractMapBasedMultimap<K,V>
-
- com.google.common.collect.AbstractSetMultimap<K,V>
-
- com.google.common.collect.Multimaps.CustomSetMultimap<K,V>
-
- All Implemented Interfaces:
Multimap<K,V>
,SetMultimap<K,V>
,java.io.Serializable
- Enclosing class:
- Multimaps
private static class Multimaps.CustomSetMultimap<K,V> extends AbstractSetMultimap<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.Set<V>>
factory
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description CustomSetMultimap(java.util.Map<K,java.util.Collection<V>> map, Supplier<? extends java.util.Set<V>> factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Set<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)
-
Methods inherited from class com.google.common.collect.AbstractSetMultimap
asMap, createUnmodifiableEmptyCollection, entries, equals, get, put, removeAll, replaceValues
-
Methods inherited from class com.google.common.collect.AbstractMapBasedMultimap
backingMap, clear, containsKey, createAsMap, createCollection, createKeySet, entryIterator, setMap, size, unmodifiableCollectionSubclass, valueIterator, values, wrapCollection
-
Methods inherited from class com.google.common.collect.AbstractMultimap
containsEntry, containsValue, createEntries, createKeys, createValues, hashCode, isEmpty, keys, keySet, putAll, putAll, remove, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.google.common.collect.Multimap
clear, containsEntry, containsKey, containsValue, hashCode, isEmpty, keys, keySet, putAll, putAll, remove, size, values
-
-
-
-
Field Detail
-
serialVersionUID
@GwtIncompatible private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
createCollection
protected java.util.Set<V> createCollection()
Description copied from class:AbstractMapBasedMultimap
Creates the collection of values for a single key.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.
- Specified by:
createCollection
in classAbstractSetMultimap<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.IOException
java.lang.ClassNotFoundException
-
-