Package com.google.common.collect
Class AbstractSortedKeySortedSetMultimap<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.AbstractSortedSetMultimap<K,V>
-
- com.google.common.collect.AbstractSortedKeySortedSetMultimap<K,V>
-
- All Implemented Interfaces:
Multimap<K,V>
,SetMultimap<K,V>
,SortedSetMultimap<K,V>
,java.io.Serializable
- Direct Known Subclasses:
TreeMultimap
abstract class AbstractSortedKeySortedSetMultimap<K,V> extends AbstractSortedSetMultimap<K,V>
Basic implementation of aSortedSetMultimap
with a sorted key set.This superclass allows
TreeMultimap
to override methods to return navigable set and map types in non-GWT only, while GWT code will inherit the SortedMap/SortedSet overrides.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.collect.AbstractMapBasedMultimap
AbstractMapBasedMultimap.NavigableAsMap, AbstractMapBasedMultimap.NavigableKeySet, AbstractMapBasedMultimap.WrappedCollection, AbstractMapBasedMultimap.WrappedList, AbstractMapBasedMultimap.WrappedNavigableSet, AbstractMapBasedMultimap.WrappedSet, AbstractMapBasedMultimap.WrappedSortedSet
-
Nested classes/interfaces inherited from class com.google.common.collect.AbstractMultimap
AbstractMultimap.Entries, AbstractMultimap.EntrySet, AbstractMultimap.Values
-
-
Constructor Summary
Constructors Constructor Description AbstractSortedKeySortedSetMultimap(java.util.SortedMap<K,java.util.Collection<V>> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.SortedMap<K,java.util.Collection<V>>
asMap()
Returns a map view that associates each key with the corresponding values in the multimap.(package private) java.util.SortedMap<K,java.util.Collection<V>>
backingMap()
(package private) java.util.Set<K>
createKeySet()
java.util.SortedSet<K>
keySet()
Returns a view collection of all distinct keys contained in this multimap.-
Methods inherited from class com.google.common.collect.AbstractSortedSetMultimap
createCollection, createUnmodifiableEmptyCollection, get, removeAll, replaceValues, unmodifiableCollectionSubclass, values, wrapCollection
-
Methods inherited from class com.google.common.collect.AbstractSetMultimap
entries, equals, put
-
Methods inherited from class com.google.common.collect.AbstractMapBasedMultimap
clear, containsKey, createAsMap, createCollection, createEntries, createKeys, createMaybeNavigableAsMap, createMaybeNavigableKeySet, createValues, entryIterator, entrySpliterator, forEach, setMap, size, valueIterator, valueSpliterator, wrapList
-
Methods inherited from class com.google.common.collect.AbstractMultimap
containsEntry, containsValue, hashCode, isEmpty, keys, 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, forEach, hashCode, isEmpty, keys, put, putAll, putAll, remove, size
-
Methods inherited from interface com.google.common.collect.SetMultimap
entries, equals
-
Methods inherited from interface com.google.common.collect.SortedSetMultimap
valueComparator
-
-
-
-
Method Detail
-
asMap
public java.util.SortedMap<K,java.util.Collection<V>> asMap()
Description copied from class:AbstractSortedSetMultimap
Returns a map view that associates each key with the corresponding values in the multimap. Changes to the returned map, such as element removal, will update the underlying multimap. The map does not supportsetValue
on its entries,put
, orputAll
.When passed a key that is present in the map,
asMap().get(Object)
has the same behavior asAbstractSortedSetMultimap.get(K)
, returning a live collection. When passed a key that is not present, however,asMap().get(Object)
returnsnull
instead of an empty collection.Though the method signature doesn't say so explicitly, the returned map has
SortedSet
values.
-
backingMap
java.util.SortedMap<K,java.util.Collection<V>> backingMap()
- Overrides:
backingMap
in classAbstractMapBasedMultimap<K,V>
-
keySet
public java.util.SortedSet<K> keySet()
Description copied from interface:Multimap
Returns a view collection of all distinct keys contained in this multimap. Note that the key set contains a key if and only if this multimap maps that key to at least one value.Changes to the returned set will update the underlying multimap, and vice versa. However, adding to the returned set is not possible.
-
createKeySet
java.util.Set<K> createKeySet()
- Overrides:
createKeySet
in classAbstractMapBasedMultimap<K,V>
-
-