org.apache.hadoop.conf.Configuration.getFloat(String arg0, float arg1)
2016-02-11 01:31
645 查看
/** 577 * Get the value of the <code>name</code> property as a <code>float</code>. 578 * If no such property is specified, or if the specified value is not a valid 579 * <code>float</code>, then <code>defaultValue</code> is returned. 580 * 581 * @param name property name. 582 * @param defaultValue default value. 583 * @return property value as a <code>float</code>, 584 * or <code>defaultValue</code>. 585 */ 586 public float getFloat(String name, float defaultValue) { 587 String valueString = get(name); 588 if (valueString == null) 589 return defaultValue; 590 try { 591 return Float.parseFloat(valueString); 592 } catch (NumberFormatException e) { 593 return defaultValue; 594 } 595 }
相关文章推荐
- apache commons io 发行审查工具结果
- apache commons io 可靠性报告
- 1.2 Apache编译安装
- 1.3 Apache的mpm工作模式
- 1.7 apache用户认证
- windows apache服务器配置多域名
- Linux下安装Apache+PHP+MySql 搭建PHP运行环境
- 笔记三、apache搭建gitweb【转】
- apache commons io 2.2(三)Monitor部分
- Apache Flex(4.15.0) + Adobe Flash Builder(4.7)环境配置
- apache commons io 2.2(二)Filter部分
- apache commons io 生成报告
- NoClassDefFoundError: org/slf4j/LoggerFactory和NoClassDefFoundError: org/apache/log4j/LogManager解决方法
- 第一次在ubuntu配置apache+php+mysql环境运行laravel5.1
- 开启Mac自带Apache步骤及遇到问题的解决办法
- 随机数工具类 org.apache.commons.lang.math.RandomUtils
- 集合工具类 org.apache.commons.collections.CollectionUtils
- 数字工具类 org.apache.commons.lang.math.NumberUtils
- 数组工具类 org.apache.commons.lang.ArrayUtils
- 字符串工具类 org.apache.commons.lang.StringUtils