Class BooleanUtils
- java.lang.Object
-
- org.fugerit.java.core.lang.helpers.BooleanUtils
-
public class BooleanUtils extends Object
Helper class for boolean check.- Author:
- Matteo a.k.a. Fugerit
-
-
Field Summary
Fields Modifier and Type Field Description static String
BOOLEAN_0
Constant for "0" Stringstatic String
BOOLEAN_1
Constant for "1" Stringstatic String
BOOLEAN_FALSE
Constant for "false" Stringstatic String
BOOLEAN_TRUE
Constant for "true" String
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isTrue(String s)
Check if String istrue
NOTE: Only "1" and "true" are considered to be aboolean true
, any other value returnboolean false
.
-
-
-
Field Detail
-
BOOLEAN_TRUE
public static final String BOOLEAN_TRUE
Constant for "true" String- See Also:
- Constant Field Values
-
BOOLEAN_1
public static final String BOOLEAN_1
Constant for "1" String- See Also:
- Constant Field Values
-
BOOLEAN_FALSE
public static final String BOOLEAN_FALSE
Constant for "false" String- See Also:
- Constant Field Values
-
BOOLEAN_0
public static final String BOOLEAN_0
Constant for "0" String- See Also:
- Constant Field Values
-
-
Method Detail
-
isTrue
public static boolean isTrue(String s)
Check if String istrue
NOTE: Only "1" and "true" are considered to be aboolean true
, any other value returnboolean false
.- Parameters:
s
- the String to check- Returns:
true
if the input String is "1" or "true",false
otherwise.
-
-