1.number的包装类(java差不多)
Byte,Float,Double,Short,Integer,Long
2.Groovy中的Numbers表示为类的方法介绍(可以参考java)
xxxValue()方法,返回值是根据调用的值函数返回的原始类型
Integer x = 5;
// Converting the number to double primitive type
println(x.doubleValue());
// Converting the number to byte primitive type
println(x.byteValue());
// Converting the number to float primitive type
println(x.floatValue());
// Converting the number to long primitive type
println(x.longValue());
// Converting the number to short primitive type
println(x.shortValue());
// Converting the number to int primitive type
println(x.intValue());
原文:https://www.cnblogs.com/HuiShouGuoQu/p/13404920.html