下面列出了org.apache.commons.lang3.math.NumberUtils#createFloat ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
public static boolean isValidFloat(@Nullable String floatStr) {
if (StringUtils.isBlank(floatStr)) {
return false;
} else {
String stripedInteger = StringUtils.strip(floatStr);
try {
NumberUtils.createFloat(stripedInteger);
return true;
} catch (NumberFormatException var3) {
return false;
}
}
}
boolean isVersionOneDotZeroOrHigher(String hgout) {
String hgVersion = parseHgVersion(hgout);
Float aFloat = NumberUtils.createFloat(hgVersion.subSequence(0, 3).toString());
return aFloat >= 1;
}