Class BooleanUtil

java.lang.Object
com.github.tadukoo.util.BooleanUtil

public final class BooleanUtil extends Object
Util functions for dealing with Booleans.
Version:
0.1-Alpha-SNAPSHOT
Author:
Logan Ferree (Tadukoo)
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Not allowed to create a BooleanUtil
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Checks that the given Boolean is false, properly handling cases of null as false (meaning returning a false result).
    static boolean
    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).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BooleanUtil

      private BooleanUtil()
      Not allowed to create a BooleanUtil
  • Method Details

    • isTrue

      public static boolean isTrue(Boolean bool)
      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

      public static boolean isFalse(Boolean bool)
      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

      public static boolean isNotTrue(Boolean bool)
      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

      public 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.
      Parameters:
      bool - The Boolean to check
      Returns:
      If the Boolean is not false