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)
    • 方法详细资料

      • valueOf

        public static Boolean valueOf(String str)
        String to boolean
        参数:
        str -
        返回:
      • isTrue

        public static boolean isTrue(Boolean bool)

        Checks if a Boolean value is true, handling null by returning false.

           BooleanUtils.isTrue(Boolean.TRUE)  = true
           BooleanUtils.isTrue(Boolean.FALSE) = false
           BooleanUtils.isTrue(null)          = false
         
        参数:
        bool - the boolean to check, null returns false
        返回:
        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, handling null by returning true.

           BooleanUtils.isNotTrue(Boolean.TRUE)  = false
           BooleanUtils.isNotTrue(Boolean.FALSE) = true
           BooleanUtils.isNotTrue(null)          = true
         
        参数:
        bool - the boolean to check, null returns true
        返回:
        true if the input is null or false
        从以下版本开始:
        2.3
      • isFalse

        public static boolean isFalse(Boolean bool)

        Checks if a Boolean value is false, handling null by returning false.

           BooleanUtils.isFalse(Boolean.TRUE)  = false
           BooleanUtils.isFalse(Boolean.FALSE) = true
           BooleanUtils.isFalse(null)          = false
         
        参数:
        bool - the boolean to check, null returns false
        返回:
        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, handling null by returning true.

           BooleanUtils.isNotFalse(Boolean.TRUE)  = true
           BooleanUtils.isNotFalse(Boolean.FALSE) = false
           BooleanUtils.isNotFalse(null)          = true
         
        参数:
        bool - the boolean to check, null returns true
        返回:
        true if the input is null or true
        从以下版本开始:
        2.3

Copyright © 2018–2021 Alibaba Group. All rights reserved.