Class BooleanUtils

java.lang.Object
io.deephaven.util.BooleanUtils

public class BooleanUtils extends Object
Utilities for translating boxed Booleans to/from primitive bytes.
  • Field Details

    • NULL_BOOLEAN_AS_BYTE

      public static final byte NULL_BOOLEAN_AS_BYTE
      The byte encoding of null booleans.
      See Also:
    • TRUE_BOOLEAN_AS_BYTE

      public static final byte TRUE_BOOLEAN_AS_BYTE
      The byte encoding of true booleans.
      See Also:
    • FALSE_BOOLEAN_AS_BYTE

      public static final byte FALSE_BOOLEAN_AS_BYTE
      The byte encoding of false booleans.
      See Also:
    • NULL_BOOLEAN_AS_BYTE_BOXED

      public static final Byte NULL_BOOLEAN_AS_BYTE_BOXED
      The byte encoding of the null boolean, as a boxed Byte.
  • Constructor Details

    • BooleanUtils

      public BooleanUtils()
  • Method Details

    • byteAsBoolean

      public static Boolean byteAsBoolean(byte byteValue)
      Convert byteValue to a Boolean.
      Parameters:
      byteValue - the byte to convert to a boxed boolean
      Returns:
      the boxed boolean represented by byteValue
    • booleanAsByte

      public static byte booleanAsByte(Boolean booleanValue)
      Convert booleanValue to a byte.
      Parameters:
      booleanValue - the boxed boolean value to convert to a byte
      Returns:
      booleanValue represented as a byte
    • booleanAsByte

      public static byte booleanAsByte(boolean booleanValue)
      Convert booleanValue to a byte.
      Parameters:
      booleanValue - the unboxed boolean value to convert to a byte
      Returns:
      booleanValue represented as a byte
    • booleanAsByteArray

      public static byte[] booleanAsByteArray(boolean[] booleanArray)
      Convert an array of booleanValues to an array of bytes.
      Parameters:
      booleanArray - the primitive boolean array to convert to a byte
      Returns:
      booleanArray represented as a byte array
    • booleanAsByteArray

      public static byte[] booleanAsByteArray(Boolean[] booleanArray)
      Convert an array of booleanValues to an array of bytes.
      Parameters:
      booleanArray - the boxed boolean array to convert to a byte
      Returns:
      booleanArray represented as a byte array