Package com.illumon.util
Class BooleanUtils
java.lang.Object
com.illumon.util.BooleanUtils
- Direct Known Subclasses:
BooleanUtils
public class BooleanUtils extends Object
Utilities for translating boxed
Boolean
s to/from primitive bytes.-
Field Summary
Fields Modifier and Type Field Description static byte
FALSE_BOOLEAN_AS_BYTE
The byte encoding of false booleans.static byte
NULL_BOOLEAN_AS_BYTE
The byte encoding of null booleans.static Byte
NULL_BOOLEAN_AS_BYTE_BOXED
The byte encoding of the null boolean, as a boxed Byte.static byte
TRUE_BOOLEAN_AS_BYTE
The byte encoding of true booleans. -
Constructor Summary
Constructors Constructor Description BooleanUtils()
-
Method Summary
Modifier and Type Method Description static byte
booleanAsByte(Boolean booleanValue)
ConvertbooleanValue
to a byte.static Boolean
byteAsBoolean(byte byteValue)
ConvertbyteValue
to a Boolean.
-
Field Details
-
NULL_BOOLEAN_AS_BYTE
public static final byte NULL_BOOLEAN_AS_BYTEThe byte encoding of null booleans.- See Also:
- Constant Field Values
-
TRUE_BOOLEAN_AS_BYTE
public static final byte TRUE_BOOLEAN_AS_BYTEThe byte encoding of true booleans.- See Also:
- Constant Field Values
-
FALSE_BOOLEAN_AS_BYTE
public static final byte FALSE_BOOLEAN_AS_BYTEThe byte encoding of false booleans.- See Also:
- Constant Field Values
-
NULL_BOOLEAN_AS_BYTE_BOXED
The byte encoding of the null boolean, as a boxed Byte.
-
-
Constructor Details
-
BooleanUtils
public BooleanUtils()
-
-
Method Details
-
byteAsBoolean
ConvertbyteValue
to a Boolean.- Parameters:
byteValue
- the byte to convert to a boxed boolean- Returns:
- the boxed boolean represented by byteValue
-
booleanAsByte
ConvertbooleanValue
to a byte.- Parameters:
booleanValue
- the boxed boolean value to convert to a byte- Returns:
- booleanValue represented as a byte
-