Class Booleans
- java.lang.Object
-
- org.apache.logging.log4j.core.util.Booleans
-
public final class Booleans extends Object
Boolean helpers.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
parseBoolean(String s, boolean defaultValue)
Returnstrue
ifs
is"true"
(case-insensitive),false
ifs
is"false"
(case-insensitive), anddefaultValue
ifs
is anything else (including null or empty).
-
-
-
Method Detail
-
parseBoolean
public static boolean parseBoolean(String s, boolean defaultValue)
Returnstrue
ifs
is"true"
(case-insensitive),false
ifs
is"false"
(case-insensitive), anddefaultValue
ifs
is anything else (including null or empty).- Parameters:
s
- TheString
to parse into aboolean
defaultValue
- The default value to use ifs
is neither"true"
nor"false"
- Returns:
- the
boolean
value represented by the argument, ordefaultValue
.
-
-