Class BooleanComparator
java.lang.Object
org.springframework.util.comparator.BooleanComparator
- All Implemented Interfaces:
Serializable
,Comparator<Boolean>
- Since:
- 1.2.2
- Author:
- Keith Donald, Eugene Rabii
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final BooleanComparator
A shared default instance of this comparator, treatingtrue
higher thanfalse
.static final BooleanComparator
A shared default instance of this comparator, treatingtrue
lower thanfalse
. -
Constructor Summary
ConstructorDescriptionBooleanComparator
(boolean trueLow) Create a BooleanComparator that sorts boolean values based on the provided flag. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
TRUE_LOW
A shared default instance of this comparator, treatingtrue
lower thanfalse
. -
TRUE_HIGH
A shared default instance of this comparator, treatingtrue
higher thanfalse
.
-
-
Constructor Details
-
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
.
-
-
Method Details