public class Booleans extends Object
| Constructor and Description |
|---|
Booleans() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isBoolean(char[] text,
int offset,
int length)
returns true if the a sequence of chars is one of "true","false","on","off","yes","no","0","1"
|
static boolean |
isExplicitFalse(String value)
Returns
true iff the value is either of the following:
false, 0, off, no
otherwise false |
static boolean |
isExplicitTrue(String value)
Returns
true iff the value is either of the following:
true, 1, on, yes
otherwise false |
static boolean |
parseBoolean(char[] text,
int offset,
int length,
boolean defaultValue)
Returns
false if text is in false, 0, off, no; else, true |
static boolean |
parseBoolean(String value,
boolean defaultValue)
Returns
true iff the value is neither of the following:
false, 0, off, no
otherwise false |
static Boolean |
parseBoolean(String value,
Boolean defaultValue) |
static Boolean |
parseBooleanExact(String value) |
public static boolean parseBoolean(char[] text,
int offset,
int length,
boolean defaultValue)
false if text is in false, 0, off, no; else, truepublic static boolean isBoolean(char[] text,
int offset,
int length)
text - sequence to checkoffset - offset to startlength - length to checkpublic static Boolean parseBooleanExact(String value)
public static boolean parseBoolean(String value, boolean defaultValue)
true iff the value is neither of the following:
false, 0, off, no
otherwise falsepublic static boolean isExplicitFalse(String value)
true iff the value is either of the following:
false, 0, off, no
otherwise falsepublic static boolean isExplicitTrue(String value)
true iff the value is either of the following:
true, 1, on, yes
otherwise falseCopyright © 2009–2016. All rights reserved.