mirror of https://github.com/alibaba/easyexcel
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
507 B
30 lines
507 B
6 years ago
|
package com.alibaba.excel.util;
|
||
|
|
||
|
/**
|
||
|
* boolean util
|
||
|
*
|
||
|
* @author zhuangjiaju
|
||
|
*/
|
||
|
public class BooleanUtils {
|
||
|
|
||
|
private static final String TRUE_NUMBER = "1";
|
||
|
private static final String FALSE_NUMBER = "0";
|
||
|
|
||
|
/**
|
||
|
* String to boolean
|
||
|
*
|
||
|
* <li>
|
||
|
*
|
||
|
* @param str
|
||
|
* @return
|
||
|
*/
|
||
|
public static Boolean valueOf(String str) {
|
||
|
if (TRUE_NUMBER.equals(str)) {
|
||
|
return Boolean.TRUE;
|
||
|
} else {
|
||
|
return Boolean.FALSE;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|