Class AbstractSortedKeySortedSetMultimap<K,​V>

    • Constructor Detail

      • AbstractSortedKeySortedSetMultimap

        AbstractSortedKeySortedSetMultimap​(java.util.SortedMap<K,​java.util.Collection<V>> map)
    • 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 support setValue on its entries, put, or putAll.

        When passed a key that is present in the map, asMap().get(Object) has the same behavior as AbstractSortedSetMultimap.get(K), returning a live collection. When passed a key that is not present, however, asMap().get(Object) returns null instead of an empty collection.

        Though the method signature doesn't say so explicitly, the returned map has SortedSet values.

        Specified by:
        asMap in interface Multimap<K,​V>
        Specified by:
        asMap in interface SetMultimap<K,​V>
        Specified by:
        asMap in interface SortedSetMultimap<K,​V>
        Overrides:
        asMap in class AbstractSortedSetMultimap<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.

        Specified by:
        keySet in interface Multimap<K,​V>
        Overrides:
        keySet in class AbstractMultimap<K,​V>