com.alibaba.excel.util
类 BooleanUtils
- java.lang.Object
-
- com.alibaba.excel.util.BooleanUtils
public class BooleanUtils extends Object
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.- 作者:
- Apache Software Foundation (ASF)
-
方法概要
所有方法 静态方法 具体方法 限定符和类型 方法和说明 static boolean
isFalse(Boolean bool)
Checks if aBoolean
value isfalse
, handlingnull
by returningfalse
.static boolean
isNotFalse(Boolean bool)
Checks if aBoolean
value is notfalse
, handlingnull
by returningtrue
.static boolean
isNotTrue(Boolean bool)
Checks if aBoolean
value is nottrue
, handlingnull
by returningtrue
.static boolean
isTrue(Boolean bool)
Checks if aBoolean
value istrue
, handlingnull
by returningfalse
.static Boolean
valueOf(String str)
String to boolean
-
方法详细资料
isTrue
public static boolean isTrue(Boolean bool)
Checks if a
Boolean
value istrue
, handlingnull
by returningfalse
.BooleanUtils.isTrue(Boolean.TRUE) = true BooleanUtils.isTrue(Boolean.FALSE) = false BooleanUtils.isTrue(null) = false
- 参数:
-
bool
- the boolean to check, null returnsfalse
- 返回:
-
true
only if the input is non-null and true - 从以下版本开始:
- 2.1
isNotTrue
public static boolean isNotTrue(Boolean bool)
Checks if a
Boolean
value is nottrue
, handlingnull
by returningtrue
.BooleanUtils.isNotTrue(Boolean.TRUE) = false BooleanUtils.isNotTrue(Boolean.FALSE) = true BooleanUtils.isNotTrue(null) = true
- 参数:
-
bool
- the boolean to check, null returnstrue
- 返回:
-
true
if the input is null or false - 从以下版本开始:
- 2.3
isFalse
public static boolean isFalse(Boolean bool)
Checks if a
Boolean
value isfalse
, handlingnull
by returningfalse
.BooleanUtils.isFalse(Boolean.TRUE) = false BooleanUtils.isFalse(Boolean.FALSE) = true BooleanUtils.isFalse(null) = false
- 参数:
-
bool
- the boolean to check, null returnsfalse
- 返回:
-
true
only if the input is non-null and false - 从以下版本开始:
- 2.1
isNotFalse
public static boolean isNotFalse(Boolean bool)
Checks if a
Boolean
value is notfalse
, handlingnull
by returningtrue
.BooleanUtils.isNotFalse(Boolean.TRUE) = true BooleanUtils.isNotFalse(Boolean.FALSE) = false BooleanUtils.isNotFalse(null) = true
- 参数:
-
bool
- the boolean to check, null returnstrue
- 返回:
-
true
if the input is null or true - 从以下版本开始:
- 2.3
Copyright © 2018–2021 Alibaba Group. All rights reserved.