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
FieldsModifier and TypeFieldDescriptionstatic final BooleanComparatorA shared default instance of this comparator, treatingtruehigher thanfalse.static final BooleanComparatorA shared default instance of this comparator, treatingtruelower thanfalse. - 
Constructor Summary
ConstructorsConstructorDescriptionBooleanComparator(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, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong 
- 
Field Details
- 
TRUE_LOW
A shared default instance of this comparator, treatingtruelower thanfalse. - 
TRUE_HIGH
A shared default instance of this comparator, treatingtruehigher 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_LOWandBooleanComparator.TRUE_HIGH. 
 - 
 - 
Method Details