@ParametersAreNonnullByDefault public final class Booleans extends Object
boolean and Boolean.| Modifier and Type | Method and Description |
|---|---|
static byte[] |
toBytes(boolean value)
Encodes a
boolean to a byte array. |
static byte[] |
toBytes(Boolean value)
Encodes a
Boolean to a byte array. |
static int |
toInt(boolean value)
Returns the integer value of a boolean
value. |
@Nonnull public static byte[] toBytes(boolean value)
boolean to a byte array.value - the value to encodebyte array@Nonnull public static byte[] toBytes(Boolean value)
Boolean to a byte array.value - the value to encodebyte arrayNullPointerException - if the value is null@Nonnegative public static int toInt(boolean value)
value. In other words, returns 1 when value ==
true, 0 otherwise.value - the boolean valueintCopyright © 2017–2019 Atlanmod. All rights reserved.