类 BooleanComparator

java.lang.Object
cn.taketoday.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.
从以下版本开始:
4.0
作者:
Keith Donald
另请参阅:
  • 字段详细资料

    • 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
      另请参阅:
  • 方法详细资料