public final class BooleanComparator extends Object implements Comparator<Object>
Modifier and Type | Method and Description |
---|---|
int |
compare(Object o1,
Object o2) |
static Comparable<Object> |
getComparable(Object object) |
static Comparator<Object> |
getComparator() |
static boolean |
isBoolean(Object o) |
static boolean |
parseBoolean(String string)
Parses a string and returns a boolean representation of it.
|
static Boolean |
toBoolean(Object o) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static Comparator<Object> getComparator()
public static Comparable<Object> getComparable(Object object)
public int compare(Object o1, Object o2)
compare
in interface Comparator<Object>
public static boolean parseBoolean(String string) throws IllegalArgumentException
string
- the string to parseIllegalArgumentException
- if the string provided is null or cannot be parsed as a
booleanpublic static boolean isBoolean(Object o)
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.