Class Overview
A Comparator for Boolean objects that can sort either true or false first.
Summary
Fields |
public
static
final
BooleanComparator |
TRUE_HIGH |
A shared default instance of this comparator, treating true higher
than false. |
public
static
final
BooleanComparator |
TRUE_LOW |
A shared default instance of this comparator, treating true lower
than false. |
Public Constructors |
|
BooleanComparator(boolean trueLow)
Create a BooleanComparator that sorts boolean values based on
the provided flag.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
java.util.Comparator
abstract
int
|
compare(T arg0, T arg1)
|
abstract
boolean
|
equals(Object arg0)
|
|
Fields
A shared default instance of this comparator, treating true higher
than false.
A shared default instance of this comparator, treating true lower
than false.
Public Constructors
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
.
Parameters
trueLow
| whether to treat true as lower or higher than false |
Public Methods
public
boolean
equals
(Object obj)