Package com.github.tadukoo.util
Class BooleanUtil
java.lang.Object
com.github.tadukoo.util.BooleanUtil
Util functions for dealing with Booleans.
- Version:
- 0.1-Alpha-SNAPSHOT
- Author:
- Logan Ferree (Tadukoo)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Checks that the given Boolean is false, properly handling cases of null as false (meaning returning a false result).static boolean
isNotFalse
(Boolean bool) Checks that the given Boolean is not false, meaning that a Boolean that's true or a null Boolean will both return a true result.static boolean
Checks that the given Boolean is not true, meaning that a Boolean that's false or a null Boolean will both return a true result.static boolean
Checks that the given Boolean is true, properly handling cases of null as false (meaning returning a false result).
-
Constructor Details
-
BooleanUtil
private BooleanUtil()Not allowed to create a BooleanUtil
-
-
Method Details
-
isTrue
Checks that the given Boolean is true, properly handling cases of null as false (meaning returning a false result).- Parameters:
bool
- The Boolean to check- Returns:
- If the Boolean is true
-
isFalse
Checks that the given Boolean is false, properly handling cases of null as false (meaning returning a false result).- Parameters:
bool
- The Boolean to check- Returns:
- If the Boolean is false
-
isNotTrue
Checks that the given Boolean is not true, meaning that a Boolean that's false or a null Boolean will both return a true result.- Parameters:
bool
- The Boolean to check- Returns:
- If the Boolean is not true
-
isNotFalse
Checks that the given Boolean is not false, meaning that a Boolean that's true or a null Boolean will both return a true result.- Parameters:
bool
- The Boolean to check- Returns:
- If the Boolean is not false
-