Class BooleanMethods


  • public final class BooleanMethods
    extends BooleanUtils
    Contains methods for manipulating boolean primitives and Boolean objects.
    • Method Detail

      • toBoolean

        public static boolean toBoolean​(Object bool)

        Return the boolean equivalent of the provided object.

        • If bool is a String and has a value of "true" (character-casing irrelevant), return true.
        • If bool is a Boolean object, then just return the provided value.
        • Return false for other conditions.

        Parameters:
        bool - the object to convert to a boolean value
        Returns:
        the boolean value of the provided object
        Since:
        1.0