本文整理汇总了Java中org.jf.util.NumberUtils类的典型用法代码示例。如果您正苦于以下问题:Java NumberUtils类的具体用法?Java NumberUtils怎么用?Java NumberUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NumberUtils类属于org.jf.util包,在下文中一共展示了NumberUtils类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: writeCommentIfLikelyFloat
import org.jf.util.NumberUtils; //导入依赖的package包/类
protected void writeCommentIfLikelyFloat(IndentingWriter writer, int val) throws IOException {
if (NumberUtils.isLikelyFloat(val)) {
writer.write(" # ");
float fval = Float.intBitsToFloat(val);
if (fval == Float.POSITIVE_INFINITY) writer.write("Float.POSITIVE_INFINITY");
else if (fval == Float.NEGATIVE_INFINITY) writer.write("Float.NEGATIVE_INFINITY");
else if (fval == Float.NaN) writer.write("Float.NaN");
else if (fval == Float.MAX_VALUE) writer.write("Float.MAX_VALUE");
else if (fval == (float) Math.PI) writer.write("(float)Math.PI");
else if (fval == (float) Math.E) writer.write("(float)Math.E");
else {
writer.write(Float.toString(fval));
writer.write('f');
}
}
}
开发者ID:alibaba,项目名称:atlas,代码行数:17,代码来源:InstructionMethodItem.java
示例2: writeCommentIfLikelyFloat
import org.jf.util.NumberUtils; //导入依赖的package包/类
protected void writeCommentIfLikelyFloat(IndentingWriter writer, int val) throws IOException {
if (NumberUtils.isLikelyFloat(val)) {
writer.write(" # ");
float fval = Float.intBitsToFloat(val);
if (fval == Float.POSITIVE_INFINITY)
writer.write("Float.POSITIVE_INFINITY");
else if (fval == Float.NEGATIVE_INFINITY)
writer.write("Float.NEGATIVE_INFINITY");
else if (fval == Float.NaN)
writer.write("Float.NaN");
else if (fval == Float.MAX_VALUE)
writer.write("Float.MAX_VALUE");
else if (fval == (float)Math.PI)
writer.write("(float)Math.PI");
else if (fval == (float)Math.E)
writer.write("(float)Math.E");
else {
writer.write(Float.toString(fval));
writer.write('f');
}
}
}
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:23,代码来源:InstructionMethodItem.java
示例3: writeCommentIfLikelyDouble
import org.jf.util.NumberUtils; //导入依赖的package包/类
protected void writeCommentIfLikelyDouble(IndentingWriter writer, long val) throws IOException {
if (NumberUtils.isLikelyDouble(val)) {
writer.write(" # ");
double dval = Double.longBitsToDouble(val);
if (dval == Double.POSITIVE_INFINITY)
writer.write("Double.POSITIVE_INFINITY");
else if (dval == Double.NEGATIVE_INFINITY)
writer.write("Double.NEGATIVE_INFINITY");
else if (dval == Double.NaN)
writer.write("Double.NaN");
else if (dval == Double.MAX_VALUE)
writer.write("Double.MAX_VALUE");
else if (dval == Math.PI)
writer.write("Math.PI");
else if (dval == Math.E)
writer.write("Math.E");
else
writer.write(Double.toString(dval));
}
}
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:21,代码来源:InstructionMethodItem.java
示例4: writeCommentIfLikelyDouble
import org.jf.util.NumberUtils; //导入依赖的package包/类
protected void writeCommentIfLikelyDouble(IndentingWriter writer, long val) throws IOException {
if (NumberUtils.isLikelyDouble(val)) {
writer.write(" # ");
double dval = Double.longBitsToDouble(val);
if (dval == Double.POSITIVE_INFINITY) writer.write("Double.POSITIVE_INFINITY");
else if (dval == Double.NEGATIVE_INFINITY) writer.write("Double.NEGATIVE_INFINITY");
else if (dval == Double.NaN) writer.write("Double.NaN");
else if (dval == Double.MAX_VALUE) writer.write("Double.MAX_VALUE");
else if (dval == Math.PI) writer.write("Math.PI");
else if (dval == Math.E) writer.write("Math.E");
else writer.write(Double.toString(dval));
}
}
开发者ID:alibaba,项目名称:atlas,代码行数:14,代码来源:InstructionMethodItem.java
注:本文中的org.jf.util.NumberUtils类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论