public class BooleanUtil extends Object
org.apache.commons.lang3.BooleanUtils| Constructor and Description |
|---|
BooleanUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
and(boolean... array)
多个值的and
|
static boolean |
negate(boolean bool)
取反
|
static Boolean |
negate(Boolean bool)
取反
|
static boolean |
or(boolean... array)
多个值的or
|
static Boolean |
parseGeneralString(String str)
支持true/false, on/off, y/n, yes/no的转换, str为空或无法分析时返回null
|
static Boolean |
parseGeneralString(String str,
Boolean defaultValue)
支持true/false,on/off, y/n, yes/no的转换, str为空或无法分析时返回defaultValue
|
static boolean |
toBoolean(String str)
使用标准JDK,只分析是否忽略大小写的"true", str为空时返回false
|
static Boolean |
toBooleanObject(String str)
使用标准JDK,只分析是否忽略大小写的"true", str为空时返回null
|
static Boolean |
toBooleanObject(String str,
Boolean defaultValue)
使用标准JDK,只分析是否忽略大小写的"true", str为空时返回defaultValue
|
public static boolean toBoolean(String str)
public static Boolean toBooleanObject(String str)
public static Boolean toBooleanObject(String str, Boolean defaultValue)
public static Boolean parseGeneralString(String str)
public static Boolean parseGeneralString(String str, Boolean defaultValue)
public static boolean negate(boolean bool)
public static boolean and(boolean... array)
public static boolean or(boolean... array)
Copyright © 2018. All rights reserved.