Class Booleans
java.lang.Object
org.apache.logging.log4j.core.util.Booleans
Boolean helpers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 Details
-
parseBoolean
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
.
-