Class Object2ShortSortedMaps.Singleton<K>

  • All Implemented Interfaces:
    Function<K,​java.lang.Short>, Object2ShortFunction<K>, Object2ShortMap<K>, Object2ShortSortedMap<K>, java.io.Serializable, java.lang.Cloneable, java.util.function.Function<K,​java.lang.Short>, java.util.function.ToIntFunction<K>, java.util.Map<K,​java.lang.Short>, java.util.SortedMap<K,​java.lang.Short>
    Enclosing class:
    Object2ShortSortedMaps

    public static class Object2ShortSortedMaps.Singleton<K>
    extends Object2ShortMaps.Singleton<K>
    implements Object2ShortSortedMap<K>, java.io.Serializable, java.lang.Cloneable
    An immutable class representing a type-specific singleton sorted map.

    This class may be useful to implement your own in case you subclass a type-specific sorted map.

    See Also:
    Serialized Form
    • Method Detail

      • comparator

        public java.util.Comparator<? super K> comparator()
        Description copied from interface: Object2ShortSortedMap
        Returns the comparator associated with this sorted set, or null if it uses its keys' natural ordering.

        Note that this specification strengthens the one given in SortedMap.comparator().

        Specified by:
        comparator in interface Object2ShortSortedMap<K>
        Specified by:
        comparator in interface java.util.SortedMap<K,​java.lang.Short>
        See Also:
        SortedMap.comparator()
      • entrySet

        @Deprecated
        public ObjectSortedSet<java.util.Map.Entry<K,​java.lang.Short>> entrySet()
        Deprecated.
        Please use the corresponding type-specific method instead.
        Returns a set view of the mappings contained in this map.

        Note that this specification strengthens the one given in Map.entrySet().

        Specified by:
        entrySet in interface java.util.Map<K,​java.lang.Short>
        Specified by:
        entrySet in interface Object2ShortMap<K>
        Specified by:
        entrySet in interface Object2ShortSortedMap<K>
        Specified by:
        entrySet in interface java.util.SortedMap<K,​java.lang.Short>
        Overrides:
        entrySet in class Object2ShortMaps.Singleton<K>
        Returns:
        a set view of the mappings contained in this map.
        See Also:
        Map.entrySet()
      • subMap

        public Object2ShortSortedMap<K> subMap​(K from,
                                               K to)
        Description copied from interface: Object2ShortSortedMap
        Returns a view of the portion of this sorted map whose keys range from fromKey, inclusive, to toKey, exclusive.

        Note that this specification strengthens the one given in SortedMap.subMap(Object,Object).

        Specified by:
        subMap in interface Object2ShortSortedMap<K>
        Specified by:
        subMap in interface java.util.SortedMap<K,​java.lang.Short>
        See Also:
        SortedMap.subMap(Object,Object)
      • headMap

        public Object2ShortSortedMap<K> headMap​(K to)
        Description copied from interface: Object2ShortSortedMap
        Returns a view of the portion of this sorted map whose keys are strictly less than toKey.

        Note that this specification strengthens the one given in SortedMap.headMap(Object).

        Specified by:
        headMap in interface Object2ShortSortedMap<K>
        Specified by:
        headMap in interface java.util.SortedMap<K,​java.lang.Short>
        See Also:
        SortedMap.headMap(Object)
      • tailMap

        public Object2ShortSortedMap<K> tailMap​(K from)
        Description copied from interface: Object2ShortSortedMap
        Returns a view of the portion of this sorted map whose keys are greater than or equal to fromKey.

        Note that this specification strengthens the one given in SortedMap.tailMap(Object).

        Specified by:
        tailMap in interface Object2ShortSortedMap<K>
        Specified by:
        tailMap in interface java.util.SortedMap<K,​java.lang.Short>
        See Also:
        SortedMap.tailMap(Object)
      • firstKey

        public K firstKey()
        Specified by:
        firstKey in interface java.util.SortedMap<K,​java.lang.Short>
      • lastKey

        public K lastKey()
        Specified by:
        lastKey in interface java.util.SortedMap<K,​java.lang.Short>