类 BooleanComparator
- java.lang.Object
- org.springframework.util.comparator.BooleanComparator
- 所有已实现的接口:
Serializable
,Comparator<Boolean>
public final 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 obj)
int
hashCode()
String
toString()
从接口继承的方法 java.util.Comparator
reversed, 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
andBooleanComparator.TRUE_HIGH
.