org.springframework.util.comparator

## 类 Comparators

- java.lang.Object
- - org.springframework.util.comparator.Comparators

-     public abstract class Comparators
      extends Object

  Convenient entry point with generically typed factory methods for common Spring `Comparator` variants.
  从以下版本开始:
    5.0
  作者:
    Juergen Hoeller

- - ### 构造器概要

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

  - ### 方法概要

    所有方法 静态方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `static <T> Comparator<T>` | `comparable()` Return a `Comparable` adapter.
    `static <T> Comparator<T>` | `nullsHigh()` Return a `Comparable` adapter which accepts null values and sorts them higher than non-null values.
    `static <T> Comparator<T>` | `nullsHigh(Comparator<T> comparator)` Return a decorator for the given comparator which accepts null values and sorts them higher than non-null values.
    `static <T> Comparator<T>` | `nullsLow()` Return a `Comparable` adapter which accepts null values and sorts them lower than non-null values.
    `static <T> Comparator<T>` | `nullsLow(Comparator<T> comparator)` Return a decorator for the given comparator which accepts null values and sorts them lower than non-null values.

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

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

- - ### 构造器详细资料

    - #### Comparators

          public Comparators()

  - ### 方法详细资料

    - #### comparable

          public static <T> Comparator<T> comparable()

      Return a `Comparable` adapter.
      另请参阅:
        `ComparableComparator.INSTANCE`

    - #### nullsLow

          public static <T> Comparator<T> nullsLow()

      Return a `Comparable` adapter which accepts null values and sorts them lower than non-null values.
      另请参阅:
        `NullSafeComparator.NULLS_LOW`

    - #### nullsLow

          public static <T> Comparator<T> nullsLow(Comparator<T> comparator)

      Return a decorator for the given comparator which accepts null values and sorts them lower than non-null values.
      另请参阅:
        `NullSafeComparator.NullSafeComparator(boolean)`

    - #### nullsHigh

          public static <T> Comparator<T> nullsHigh()

      Return a `Comparable` adapter which accepts null values and sorts them higher than non-null values.
      另请参阅:
        `NullSafeComparator.NULLS_HIGH`

    - #### nullsHigh

          public static <T> Comparator<T> nullsHigh(Comparator<T> comparator)

      Return a decorator for the given comparator which accepts null values and sorts them higher than non-null values.
      另请参阅:
        `NullSafeComparator.NullSafeComparator(boolean)`