org.springframework.util.comparator

## 类 BooleanComparator

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

- 所有已实现的接口:
    Serializable, Comparator<Boolean>

      public class BooleanComparator
      extends Object
      implements Comparator<Boolean>, Serializable

  A `Comparator` for `Boolean` objects that can sort either `true` or `false` first.
  从以下版本开始:
    1.2.2
  作者:
    Keith Donald
  另请参阅:
    序列化表格

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static BooleanComparator` | `TRUE_HIGH` A shared default instance of this comparator, treating `true` higher than `false`.
    `static BooleanComparator` | `TRUE_LOW` A shared default instance of this comparator, treating `true` lower than `false`.

  - ### 构造器概要

    构造器
    构造器和说明
    `BooleanComparator(boolean trueLow)` Create a BooleanComparator that sorts boolean values based on the provided flag.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `int` | `compare(Boolean v1, Boolean v2)`
    `boolean` | `equals(Object other)`
    `int` | `hashCode()`
    `String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

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

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

- - ### 字段详细资料

    - #### TRUE_LOW

          public static final BooleanComparator TRUE_LOW

      A shared default instance of this comparator, treating `true` lower than `false`.

    - #### TRUE_HIGH

          public static final BooleanComparator TRUE_HIGH

      A shared default instance of this comparator, treating `true` higher than `false`.

  - ### 构造器详细资料

    - #### BooleanComparator

          public BooleanComparator(boolean trueLow)

      Create a BooleanComparator that sorts boolean values based on the provided flag.

      Alternatively, you can use the default shared instances: `BooleanComparator.TRUE_LOW` and `BooleanComparator.TRUE_HIGH`.

      参数:
        `trueLow` - whether to treat true as lower or higher than false
      另请参阅:
        `TRUE_LOW`, `TRUE_HIGH`

  - ### 方法详细资料

    - #### compare

          public int compare(Boolean v1,
                             Boolean v2)

      指定者:
        `compare` 在接口中 `Comparator<Boolean>`

    - #### equals

          public boolean equals(Object other)

      指定者:
        `equals` 在接口中 `Comparator<Boolean>`
      覆盖:
        `equals` 在类中 `Object`

    - #### hashCode

          public int hashCode()

      覆盖:
        `hashCode` 在类中 `Object`

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `Object`