## Uses of Interface
java.lang.Comparable

- Packages that use Comparable
  Package | Description
  --- | ---
  java.io |
  java.lang |
  java.lang.annotation |
  java.math | Provides classes for performing arbitrary-precision integer arithmetic (`BigInteger`) and arbitrary-precision decimal arithmetic (`BigDecimal`).
  java.net |
  java.nio.charset |
  java.util |
  java.util.concurrent | Utility classes commonly useful in concurrent programming.
  java.util.stream | Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.
  org.apidesign.vm4brwsr |

- - ### Uses of Comparable in java.io

    Classes in java.io that implement Comparable
    Modifier and Type | Class and Description
    --- | ---
    `class` | `File` An abstract representation of file and directory pathnames.
    `class` | `ObjectStreamField` A description of a Serializable field from a Serializable class.

  - ### Uses of Comparable in java.lang

    Classes in java.lang that implement Comparable
    Modifier and Type | Class and Description
    --- | ---
    `class` | `Boolean` The Boolean class wraps a value of the primitive type `boolean` in an object.
    `class` | `Byte` The `Byte` class wraps a value of primitive type `byte` in an object.
    `class` | `Character` The `Character` class wraps a value of the primitive type `char` in an object.
    `class` | `Double` The `Double` class wraps a value of the primitive type `double` in an object.
    `class` | `Enum<E extends Enum<E>>` This is the common base class of all Java language enumeration types.
    `class` | `Float` The `Float` class wraps a value of primitive type `float` in an object.
    `class` | `Integer` The `Integer` class wraps a value of the primitive type `int` in an object.
    `class` | `Long` The `Long` class wraps a value of the primitive type `long` in an object.
    `class` | `Short` The `Short` class wraps a value of primitive type `short` in an object.
    `class` | `String` The `String` class represents character strings.
    `static class` | `System.Logger.Level`
    `static class` | `Thread.State` A thread state.

  - ### Uses of Comparable in java.lang.annotation

    Classes in java.lang.annotation that implement Comparable
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ElementType` A program element type.
    `class` | `RetentionPolicy` Annotation retention policy.

  - ### Uses of Comparable in java.math

    Classes in java.math that implement Comparable
    Modifier and Type | Class and Description
    --- | ---
    `class` | `BigDecimal` Immutable, arbitrary-precision signed decimal numbers.
    `class` | `BigInteger` Immutable arbitrary-precision integers.
    `class` | `RoundingMode` Specifies a rounding behavior for numerical operations capable of discarding precision.

  - ### Uses of Comparable in java.net

    Classes in java.net that implement Comparable
    Modifier and Type | Class and Description
    --- | ---
    `class` | `URI` Represents a Uniform Resource Identifier (URI) reference.

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

    Classes in java.nio.charset that implement Comparable
    Modifier and Type | Class and Description
    --- | ---
    `class` | `Charset` A named mapping between sequences of sixteen-bit Unicode code units and sequences of bytes.

  - ### Uses of Comparable in java.util

    Classes in java.util that implement Comparable
    Modifier and Type | Class and Description
    --- | ---
    `class` | `Calendar` The `Calendar` class is an abstract class that provides methods for converting between a specific instant in time and a set of `calendar fields` such as `YEAR`, `MONTH`, `DAY_OF_MONTH`, `HOUR`, and so on, and for manipulating the calendar fields, such as getting the date of the next week.
    `class` | `Date` The class `Date` represents a specific instant in time, with millisecond precision.
    `static class` | `Locale.Category` Enum for locale categories.

    Methods in java.util with type parameters of type Comparable
    Modifier and Type | Method and Description
    --- | ---
    `static <T,U extends Comparable<? super U>> Comparator<T>` | Comparator.`comparing(Function<? super T,? extends U> keyExtractor)` Accepts a function that extracts a `Comparable` sort key from a type `T`, and returns a `Comparator<T>` that compares by that sort key.
    `static <K extends Comparable<? super K>,V> Comparator<Map.Entry<K,V>>` | Map.Entry.`comparingByKey()` Returns a comparator that compares `Map.Entry` in natural order on key.
    `static <K,V extends Comparable<? super V>> Comparator<Map.Entry<K,V>>` | Map.Entry.`comparingByValue()` Returns a comparator that compares `Map.Entry` in natural order on value.
    `static <T extends Object & Comparable<? super T>> T` | Collections.`max(Collection<? extends T> coll)` Returns the maximum element of the given collection, according to the natural ordering of its elements.
    `static <T extends Object & Comparable<? super T>> T` | Collections.`min(Collection<? extends T> coll)` Returns the minimum element of the given collection, according to the natural ordering of its elements.
    `static <T extends Comparable<? super T>> Comparator<T>` | Comparator.`naturalOrder()` Returns a comparator that compares `Comparable` objects in natural order.
    `static <T extends Comparable<? super T>> void` | Arrays.`parallelSort(T[] a)` Sorts the specified array of objects into ascending order, according to the natural ordering of its elements.
    `static <T extends Comparable<? super T>> void` | Arrays.`parallelSort(T[] a, int fromIndex, int toIndex)` Sorts the specified range of the specified array of objects into ascending order, according to the natural ordering of its elements.
    `static <T extends Comparable<? super T>> Comparator<T>` | Comparator.`reverseOrder()` Returns a comparator that imposes the reverse of the natural ordering.
    `static <T extends Comparable<? super T>> void` | Collections.`sort(List<T> list)` Sorts the specified list into ascending order, according to the natural ordering of its elements.
    `default <U extends Comparable<? super U>> Comparator<T>` | Comparator.`thenComparing(Function<? super T,? extends U> keyExtractor)` Returns a lexicographic-order comparator with a function that extracts a `Comparable` sort key.

    Methods in java.util with parameters of type Comparable
    Modifier and Type | Method and Description
    --- | ---
    `static <T extends Comparable<? super T>> void` | Arrays.`parallelSort(T[] a)` Sorts the specified array of objects into ascending order, according to the natural ordering of its elements.
    `static <T extends Comparable<? super T>> void` | Arrays.`parallelSort(T[] a, int fromIndex, int toIndex)` Sorts the specified range of the specified array of objects into ascending order, according to the natural ordering of its elements.

    Method parameters in java.util with type arguments of type Comparable
    Modifier and Type | Method and Description
    --- | ---
    `static <T> int` | Collections.`binarySearch(List<? extends Comparable<? super T>> list, T key)` Searches the specified list for the specified object using the binary search algorithm.

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

    Subinterfaces of Comparable in java.util.concurrent
    Modifier and Type | Interface and Description
    --- | ---
    `interface` | `Delayed` A mix-in style interface for marking objects that should be acted upon after a given delay.
    `interface` | `RunnableScheduledFuture<V>` A `ScheduledFuture` that is `Runnable`.
    `interface` | `ScheduledFuture<V>` A delayed result-bearing action that can be cancelled.

    Classes in java.util.concurrent that implement Comparable
    Modifier and Type | Class and Description
    --- | ---
    `class` | `TimeUnit` A `TimeUnit` represents time durations at a given unit of granularity and provides utility methods to convert across units, and to perform timing and delay operations in these units.

  - ### Uses of Comparable in java.util.stream

    Classes in java.util.stream that implement Comparable
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Collector.Characteristics` Characteristics indicating properties of a `Collector`, which can be used to optimize reduction implementations.

  - ### Uses of Comparable in org.apidesign.vm4brwsr

    Classes in org.apidesign.vm4brwsr that implement Comparable
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ObfuscationLevel` Defines obfuscation level of produced JavaScript files.

Copyright © 2025 API Design. All Rights Reserved.