Uses of Interface java.util.SortedMap (Java SE 21 & JDK 21)
Description: use: module: java.base, package: java.util, interface: SortedMap

# Uses of Interface
java.util.SortedMap

Packages that use SortedMap
Package
Description
java.nio.charset
Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters.
java.util
Contains the collections framework, some internationalization support classes, a service loader, properties, random number generation, string parsing and scanning classes, base64 encoding and decoding, a bit array, and several miscellaneous utility classes.
java.util.concurrent
Utility classes commonly useful in concurrent programming.

- ## Uses of SortedMap in java.nio.charset

  Methods in java.nio.charset that return SortedMap
  Modifier and Type
  Method
  Description
  `static SortedMap<String,Charset>`
  Charset.`availableCharsets()`
  Constructs a sorted map from canonical charset names to charset objects.

- ## Uses of SortedMap in java.util

  Subinterfaces of SortedMap in java.util
  Modifier and Type
  Interface
  Description
  `interface`
  `NavigableMap<K,V>`
  A `SortedMap` extended with navigation methods returning the closest matches for given search targets.
  Classes in java.util that implement SortedMap
  Modifier and Type
  Class
  Description
  `class`
  `TreeMap<K,V>`
  A Red-Black tree based `NavigableMap` implementation.
  Methods in java.util that return SortedMap
  Modifier and Type
  Method
  Description
  `static <K, V> SortedMap<K,V>`
  Collections.`checkedSortedMap(SortedMap<K,V> m, Class<K> keyType, Class<V> valueType)`
  Returns a dynamically typesafe view of the specified sorted map.
  `static final <K, V> SortedMap<K,V>`
  Collections.`emptySortedMap()`
  Returns an empty sorted map (immutable).
  `SortedMap<K,V>`
  NavigableMap.`headMap(K toKey)`
  Returns a view of the portion of this map whose keys are strictly less than `toKey`.
  `SortedMap<K,V>`
  SortedMap.`headMap(K toKey)`
  Returns a view of the portion of this map whose keys are strictly less than `toKey`.
  `SortedMap<K,V>`
  TreeMap.`headMap(K toKey)`
  `default SortedMap<K,V>`
  SortedMap.`reversed()`
  Returns a reverse-ordered view of this map.
  `SortedMap<K,V>`
  NavigableMap.`subMap(K fromKey, K toKey)`
  Returns a view of the portion of this map whose keys range from `fromKey`, inclusive, to `toKey`, exclusive.
  `SortedMap<K,V>`
  SortedMap.`subMap(K fromKey, K toKey)`
  Returns a view of the portion of this map whose keys range from `fromKey`, inclusive, to `toKey`, exclusive.
  `SortedMap<K,V>`
  TreeMap.`subMap(K fromKey, K toKey)`
  `static <K, V> SortedMap<K,V>`
  Collections.`synchronizedSortedMap(SortedMap<K,V> m)`
  Returns a synchronized (thread-safe) sorted map backed by the specified sorted map.
  `SortedMap<K,V>`
  NavigableMap.`tailMap(K fromKey)`
  Returns a view of the portion of this map whose keys are greater than or equal to `fromKey`.
  `SortedMap<K,V>`
  SortedMap.`tailMap(K fromKey)`
  Returns a view of the portion of this map whose keys are greater than or equal to `fromKey`.
  `SortedMap<K,V>`
  TreeMap.`tailMap(K fromKey)`
  `static <K, V> SortedMap<K,V>`
  Collections.`unmodifiableSortedMap(SortedMap<K,? extends V> m)`
  Returns an unmodifiable view of the specified sorted map.
  Methods in java.util with parameters of type SortedMap
  Modifier and Type
  Method
  Description
  `static <K, V> SortedMap<K,V>`
  Collections.`checkedSortedMap(SortedMap<K,V> m, Class<K> keyType, Class<V> valueType)`
  Returns a dynamically typesafe view of the specified sorted map.
  `static <K, V> SortedMap<K,V>`
  Collections.`synchronizedSortedMap(SortedMap<K,V> m)`
  Returns a synchronized (thread-safe) sorted map backed by the specified sorted map.
  `static <K, V> SortedMap<K,V>`
  Collections.`unmodifiableSortedMap(SortedMap<K,? extends V> m)`
  Returns an unmodifiable view of the specified sorted map.
  Constructors in java.util with parameters of type SortedMap
  Modifier
  Constructor
  Description
  ``
  `TreeMap(SortedMap<K,? extends V> m)`
  Constructs a new tree map containing the same mappings and using the same ordering as the specified sorted map.

- ## Uses of SortedMap in java.util.concurrent

  Subinterfaces of SortedMap in java.util.concurrent
  Modifier and Type
  Interface
  Description
  `interface`
  `ConcurrentNavigableMap<K,V>`
  A `ConcurrentMap` supporting `NavigableMap` operations, and recursively so for its navigable sub-maps.
  Classes in java.util.concurrent that implement SortedMap
  Modifier and Type
  Class
  Description
  `class`
  `ConcurrentSkipListMap<K,V>`
  A scalable concurrent `ConcurrentNavigableMap` implementation.
  Constructors in java.util.concurrent with parameters of type SortedMap
  Modifier
  Constructor
  Description
  ``
  `ConcurrentSkipListMap(SortedMap<K,? extends V> m)`
  Constructs a new map containing the same mappings and using the same ordering as the specified sorted map.