Class Booleans
- java.lang.Object
-
- org.apache.logging.log4j.core.util.Booleans
-
public final class Booleans extends java.lang.ObjectBoolean helpers.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateBooleans()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanparseBoolean(java.lang.String s, boolean defaultValue)Returnstrueifsis"true"(case-insensitive),falseifsis"false"(case-insensitive), anddefaultValueifsis anything else (including null or empty).
-
-
-
Method Detail
-
parseBoolean
public static boolean parseBoolean(java.lang.String s, boolean defaultValue)Returnstrueifsis"true"(case-insensitive),falseifsis"false"(case-insensitive), anddefaultValueifsis anything else (including null or empty).- Parameters:
s- TheStringto parse into abooleandefaultValue- The default value to use ifsis neither"true"nor"false"- Returns:
- the
booleanvalue represented by the argument, ordefaultValue.
-
-