public interface Booleans
| 限定符和类型 | 字段和说明 |
|---|---|
static boolean |
FALSE |
static byte |
FALSE_BYTE |
static boolean |
TRUE |
static byte |
TRUE_BYTE |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
isTrue(Byte val)
是否为true,当val为null,返回false
|
static boolean |
isTrue(Byte val,
boolean whenNull)
是否为true
|
static boolean |
isTrue(Integer b)
是否为true
|
static boolean |
isTrue(Long b)
是否为true
|
static byte |
toByte(boolean bool)
布尔值转为字节
|
static byte |
toByte(boolean bool,
byte trueValue,
byte falseValue)
布尔值转为字节
|
static byte |
toByte(Boolean bool,
byte trueValue,
byte falseValue,
byte nullValue)
布尔值转为字节
|
static byte |
toValue(Boolean b)
布尔转字节
|
static final byte TRUE_BYTE
static final byte FALSE_BYTE
static final boolean TRUE
static final boolean FALSE
static boolean isTrue(Byte val)
val - 值static boolean isTrue(Byte val, boolean whenNull)
val - 值whenNull - 当val为null时,返回whenNull指定的值static boolean isTrue(Long b)
b - 字节static boolean isTrue(Integer b)
b - 字节static byte toValue(Boolean b)
b - 布尔值static byte toByte(boolean bool)
bool - 布尔值static byte toByte(boolean bool,
byte trueValue,
byte falseValue)
bool - 布尔值trueValue - true值falseValue - false值static byte toByte(Boolean bool, byte trueValue, byte falseValue, byte nullValue)
bool - 布尔值trueValue - true值falseValue - false值nullValue - null值Copyright © 2024. All rights reserved.