首页 > 其他分享 >【API文档】apache.的BooleanUtils类

【API文档】apache.的BooleanUtils类

时间:2024-10-11 15:13:46浏览次数:1  
标签:API boolean public Boolean bool apache static final BooleanUtils

org.apache.commons.lang3.BooleanUtils类方法分析

方法签名功能或适用场景入参详细解释
public static boolean and(final boolean... array) 对一组boolean值进行与操作
  • array: 一组boolean值
public static Boolean and(final Boolean... array) 对一组Boolean对象进行与操作
  • array: 一组Boolean对象
public static boolean or(final boolean... array) 对一组boolean值进行或操作
  • array: 一组boolean值
public static Boolean or(final Boolean... array) 对一组Boolean对象进行或操作
  • array: 一组Boolean对象
public static boolean xor(final boolean... array) 对一组boolean值进行异或操作
  • array: 一组boolean值
public static Boolean xor(final Boolean... array) 对一组Boolean对象进行异或操作
  • array: 一组Boolean对象
public static boolean toBoolean(final Boolean bool) 将Boolean对象转换为boolean值
  • bool: 要转换的Boolean对象
public static boolean toBoolean(final int value) 将int值转换为boolean值,非零为true,零���false
  • value: 要转换的int值
public static boolean toBoolean(final int value, final int trueValue, final int falseValue) 将int值转换为boolean值,指定true和false的匹配值
  • value: 要转换的int值
  • trueValue: 匹配true的值
  • falseValue: 匹配false的值
public static boolean toBoolean(final Integer value, final Integer trueValue, final Integer falseValue) 将Integer对象转换为boolean值,指定true和false的匹配值
  • value: 要转换的Integer对象
  • trueValue: 匹配true的值
  • falseValue: 匹配false的值
public static boolean toBoolean(final String str) 将String对象转换为boolean值,支持多种true和false的字符串表示
  • str: 要转换的String对象
public static boolean toBoolean(final String str, final String trueString, final String falseString) 将String对象转换为boolean值,指定true和false的匹配字符串
  • str: 要转换的String对象
  • trueString: 匹配true的字符串
  • falseString: 匹配false的字符串
public static boolean toBooleanDefaultIfNull(final Boolean bool, final boolean valueIfNull) 将Boolean对象转换为boolean值,如果为null则返回指定的默认值
  • bool: 要转换的Boolean对象
  • valueIfNull: 如果bool为null时返回的默认值
public static Boolean toBooleanObject(final int value) 将int值转换为Boolean对象,非零为Boolean.TRUE,零为Boolean.FALSE
  • value: 要转换的int值
public static Boolean toBooleanObject(final int value, final int trueValue, final int falseValue, final int nullValue) 将int值转换为Boolean对象,指定true、false和null的匹配值
  • value: 要转换的int值
  • trueValue: 匹配true的值
  • falseValue: 匹配false的值
  • nullValue: 匹配null的值
public static Boolean toBooleanObject(final Integer value) 将Integer对象转换为Boolean对象,非零为Boolean.TRUE,零为Boolean.FALSE
  • value: 要转换的Integer对象
public static Boolean toBooleanObject(final Integer value, final Integer trueValue, final Integer falseValue, final Integer nullValue) 将Integer对象转换为Boolean对象,指定true、false和null的匹配值
  • value: 要转换的Integer对象
  • trueValue: 匹配true的值
  • falseValue: 匹配false���值
  • nullValue: 匹配null的值
public static Boolean toBooleanObject(final String str) 将String对象转换为Boolean对象,支持多种true和false的字符串表示
  • str: 要转换的String对象
public static Boolean toBooleanObject(final String str, final String trueString, final String falseString, final String nullString) 将String对象转换为Boolean对象,指定true、false和null的匹配字符串
  • str: 要转换的String对象
  • trueString: 匹配true的字符串
  • falseString: 匹配false的字符串
  • nullString: 匹配null的字符串
public static int toInteger(final boolean bool) 将boolean值转��为int值,true为1,false为0
  • bool: 要转换的boolean值
public static int toInteger(final boolean bool, final int trueValue, final int falseValue) 将boolean值转换为int值,指定true和false的匹配值
  • bool: 要转换的boolean值
  • trueValue: 匹配true的值
  • falseValue: 匹配false的值
public static int toInteger(final Boolean bool, final int trueValue, final int falseValue, final int nullValue) 将Boolean对象转换为int值,指定true、false和null的匹配值
  • bool: 要转换的Boolean对象
  • trueValue: 匹配true的值
  • falseValue: 匹配false的值
  • nullValue: 匹配null的值
public static Integer toIntegerObject(final boolean bool) 将boolean值转换为Integer对象,true为Integer.valueOf(1),false为Integer.valueOf(0)
  • bool: 要转换的boolean值
public static Integer toIntegerObject(final boolean bool, final Integer trueValue, final Integer falseValue) 将boolean值转换为Integer对象,指定true和false的匹配值
  • bool: 要转换的boolean值
  • trueValue: 匹配true的值
  • falseValue: 匹配false的值
public static Integer toIntegerObject(final Boolean bool) 将Boolean对象转换为Integer对象,true为Integer.valueOf(1),false为Integer.valueOf(0)
  • bool: 要转换的Boolean对象
public static Integer toIntegerObject(final Boolean bool, final Integer trueValue, final Integer falseValue, final Integer nullValue) 将Boolean对象转换为Integer对象,指定true、false和null的匹配值
  • bool: 要转换的Boolean对象
  • trueValue: 匹配true的值
  • falseValue: 匹配false的值
  • nullValue: 匹配null的值
public static String toString(final Boolean bool, final String trueString, final String falseString, final String nullString) 将Boolean对象转换为String对象,指定true、false和null的匹配字符串
  • bool: 要转换的Boolean对象
  • trueString: 匹配true的字符串
  • falseString: 匹配false的字符串
  • nullString: 匹配null的字符串
public static String toString(final boolean bool, final String trueString, final String falseString) 将boolean值转换为String对象,指定true和false的匹配字符串
  • bool: 要转换的boolean值
  • trueString: 匹配true的字符串
  • falseString: 匹配false的字符串
public static String toStringOnOff(final Boolean bool) 将Boolean对象转换为"on"或"off"字符串
  • bool: 要转换的Boolean对象
public static String toStringOnOff(final boolean bool) 将boolean值转换为"on"或"off"字符串
  • bool: 要转换的boolean值
public static String toStringTrueFalse(final Boolean bool) 将Boolean对象转换为"true"或"false"字符串
  • bool: 要转换的Boolean对象
public static String toStringTrueFalse(final boolean bool) 将boolean值转换为"true"或"false"字符串
  • bool: 要转换的boolean值
public static String toStringYesNo(final Boolean bool) 将Boolean对象转换为"yes"或"no"字符串
  • bool: 要转换的Boolean对象
public static String toStringYesNo(final boolean bool) 将boolean值转换为"yes"或"no"字符串
  • bool: 要转换的boolean值

标签:API,boolean,public,Boolean,bool,apache,static,final,BooleanUtils
From: https://www.cnblogs.com/auv2009/p/18458430

相关文章

  • 【API文档】apache的BooleanUtils类
    org.apache.commons.lang3.StringUtils类提供的方法列表:方法签名功能描述参数解释booleancontains(CharSequenceseq,intsearchChar)检查字符序列中是否包含指定的字符。seq:要检查的字符序列。searchChar:要查找的字符。booleancontains(CharSequenceseq......
  • 教你如何免费获取股票数据用python、JavaScript (Node.js)、JAVA等多种语言的实例代码
    ​近一两年来,股票量化分析逐渐受到广泛关注。而作为这一领域的初学者,首先需要面对的挑战就是如何获取全面且准确的股票数据。因为无论是实时交易数据、历史交易记录、财务数据还是基本面信息,这些数据都是我们进行量化分析时不可或缺的宝贵资源。我们的核心任务是从这些数据......
  • 京东 API 接口获取商品详情数据示例表格输出
    由于实际的API调用需要API密钥和访问权限,而且这些通常不公开分享,我将提供一个假设性的框架和示例,说明如何从京东API获取商品详情数据,并将其整理成表格形式。如果你已经有了京东开放平台的API访问权限,你可以根据以下步骤和示例代码进行调整,以实际获取数据。步骤一:获取京东API......
  • 盘点免费且靠谱的AI大模型 API,统一封装,任性调用!
    ​现在做大模型,还有靠谱且免费的API接口吗?靠谱的不免费,免费的不靠谱,鱼和熊掌不可兼得?非也!对于简单的指令而言,绝大部分免费的LLMAPI还是能打的,本文就给大家介绍几款,猴哥亲测好用的免费的API接口!免费LLMAPI汇总(持续更新中)大模型免费版本免费限制备注API讯......
  • 解锁京东店铺潜力:15大场景揭秘商品列表API接口
    随着电子商务的蓬勃发展,API接口成为连接商家与平台的重要桥梁。京东作为中国领先的电商平台,提供了丰富的API接口,帮助商家更高效地管理店铺和商品。主要用作于一下场景商品展示:在商家自己的网站或移动应用上展示京东店铺的商品列表,方便用户浏览和购买。库存管理:实时获取商......
  • DATAGERRY REST API身份验证绕过漏洞(CVE-2024-46627)
    0X01产品描述:        ‌DATAGERRY是一个灵活的开源CMDB和资产管理工具,它完全将数据模型的定义留给用户。‌用户只需在一个易于使用的webfrontend中定义自己的对象类型(如服务器、路由器、租赁线路、位置等)。通过DATAGERRY的导出API,存储在DATAGERRY中的CMDB对象可以轻......
  • 降低数据平台成本 ,Apache Airflow迁移上云案例分享
    本文分享自华为云社区《华为云DTSE团队通过开源专业服务,助力马来西亚X集团平滑迁移上云》,作者:华为云开发者联盟DTSE团队。1  摘要本文主要介绍了华为云DTSE助力马来西亚X集团部署开源工作流平台ApacheAirflow的案例。Airflow是一款面向数据处理场景,提供以编程方式编写、调度......
  • 大数据-164 Apache Kylin Cube优化 案例1 定义衍生维度与对比 超详细
    点一下关注吧!!!非常感谢!!持续更新!!!目前已经更新到了:Hadoop(已更完)HDFS(已更完)MapReduce(已更完)Hive(已更完)Flume(已更完)Sqoop(已更完)Zookeeper(已更完)HBase(已更完)Redis(已更完)Kafka(已更完)Spark(已更完)Flink(已更完)ClickHouse(已更完)Kudu(已更完)Druid(已更完)Kylin(正在更新…)章节内容上节......
  • 大数据-162 Apache Kylin 全量增量Cube的构建 Segment 超详细记录 多图
    点一下关注吧!!!非常感谢!!持续更新!!!目前已经更新到了:Hadoop(已更完)HDFS(已更完)MapReduce(已更完)Hive(已更完)Flume(已更完)Sqoop(已更完)Zookeeper(已更完)HBase(已更完)Redis(已更完)Kafka(已更完)Spark(已更完)Flink(已更完)ClickHouse(已更完)Kudu(已更完)Druid(已更完)Kylin(正在更新…)章节内容上节......
  • 运行使用Electron-forge打包的electron package时遇到在js文件中执行的exec命令和在渲
    js文件中执行的exec命令出错很可能是项目中使用了一些非html,css,js的源文件,比如用了Makefile来编译了cpp代码,或者执行的exec命令为cpdir/something.cpp之类的文件操作命令。可以使用修改forge.config.js文件配置的方式,使得npmrunmake的时候自动把Makefile等exec命令中用到......