org.springframework.util.comparator

## 类 ComparableComparator<T extends Comparable<T>>

- java.lang.Object
- - org.springframework.util.comparator.ComparableComparator<T>

- 所有已实现的接口:
    Comparator<T>

      public class ComparableComparator<T extends Comparable<T>>
      extends Object
      implements Comparator<T>

  Comparator that adapts Comparables to the Comparator interface. Mainly for internal use in other Comparators, when supposed to work on Comparables.
  从以下版本开始:
    1.2.2
  作者:
    Keith Donald
  另请参阅:
    `Comparable`

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static ComparableComparator` | `INSTANCE` A shared instance of this default comparator

  - ### 构造器概要

    构造器
    构造器和说明
    `ComparableComparator()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `int` | `compare(T o1, T o2)`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### 从接口继承的方法 java.util.Comparator

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### 字段详细资料

    - #### INSTANCE

          public static final ComparableComparator INSTANCE

      A shared instance of this default comparator
      另请参阅:
        `Comparators.comparable()`

  - ### 构造器详细资料

    - #### ComparableComparator

          public ComparableComparator()

  - ### 方法详细资料

    - #### compare

          public int compare(T o1,
                             T o2)

      指定者:
        `compare` 在接口中 `Comparator<T extends Comparable<T>>`