SetMultimap whose set of values for a given key are kept sorted; that is, they comprise
a SortedSet. It cannot hold duplicate key-value pairs; adding a key-value pair that's
already in the multimap has no effect. This interface does not specify the ordering of the
multimap's keys. See the Multimap documentation for information common to all multimaps.
The get, removeAll, and replaceValues methods each return a SortedSet of values, while Multimap#entries() returns a Set of map entries.
Though the method signature doesn't say so explicitly, the map returned by asMap has
SortedSet values.
Warning
As in all SetMultimaps, do not modify either a key or a value
of a SortedSetMultimap in a way that affects its Object#equals behavior (or its
position in the order of the values). Undefined behavior and bugs will result.
See the Guava User Guide article on Multimap.
| Modifier and Type | Method and Description |
|---|---|
| public Map | asMap()
Redeclares com. |
| public SortedSet | get(K key)
Redeclares com. |
| public SortedSet | removeAll(Object key)
Redeclares com. |
| public SortedSet | replaceValues(K key, Iterable<? extends V> values)
Redeclares com. |
| public Comparator | valueComparator()
Returns the comparator that orders the multimap values, with |
| asMap | back to summary |
|---|---|
| public Map Redeclares com. 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 support When passed a key that is present in the map, Note The returned map's values are guaranteed to be of type
| |
| get | back to summary |
|---|---|
| public SortedSet Redeclares com. Returns a collection view of all values associated with a key. If no mappings in the multimap have the provided key, an empty collection is returned. Changes to the returned collection will update the underlying multimap, and vice versa. Because a
| |
| removeAll | back to summary |
|---|---|
| public SortedSet Redeclares com. Removes all values associated with a given key. Because a
| |
| replaceValues | back to summary |
|---|---|
| public SortedSet Redeclares com. Stores a collection of values with the same key, replacing any existing values for that key. Because a Any duplicates in
| |
| valueComparator | back to summary |
|---|---|
| public Comparator Returns the comparator that orders the multimap values, with
| |