Class Booleans

java.lang.Object
com.pnfsoftware.jeb.util.primitives.Booleans

public class Booleans extends Object
Utility methods for boolean objects and primitives.
  • Constructor Details

    • Booleans

      public Booleans()
  • Method Details

    • isTrue

      public static boolean isTrue(Boolean object)
      Test whether a boxed Boolean is non-null and true.
      Parameters:
      object - boxed Boolean
      Returns:
      true if the object is Boolean.TRUE
    • isFalse

      public static boolean isFalse(Boolean object)
      Test whether a boxed Boolean is non-null and false.
      Parameters:
      object - boxed Boolean
      Returns:
      true if the object is Boolean.FALSE
    • toBoolean

      public static boolean toBoolean(Boolean object)
      Convert a boxed Boolean to a primitive boolean.
      Parameters:
      object - boxed Boolean
      Returns:
      true if the object is non-null and true
    • equals

      public static boolean equals(Boolean object1, Boolean object2)
      Null safe equals method.
      Parameters:
      object1 - first Boolean, may be null
      object2 - second Boolean, may be null
      Returns:
      true if both values are null or equal