net.sf.jml.util
Class NumberUtils
java.lang.Object
net.sf.jml.util.NumberUtils
public class NumberUtils
- extends Object
Some utils for number
- Author:
- Roger Chen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NumberUtils
public NumberUtils()
isDigits
public static boolean isDigits(String s)
isNumber
public static boolean isNumber(String s)
stringToByte
public static byte stringToByte(String s,
byte defaultValue)
stringToByte
public static byte stringToByte(String s)
stringToShort
public static short stringToShort(String s,
short defaultValue)
stringToShort
public static short stringToShort(String s)
stringToInt
public static int stringToInt(String s,
int defaultValue)
stringToInt
public static int stringToInt(String s)
stringToLong
public static long stringToLong(String s,
long defaultValue)
stringToLong
public static long stringToLong(String s)
stringToFloat
public static float stringToFloat(String s,
float defaultValue)
stringToFloat
public static float stringToFloat(String s)
toHexValue
public static String toHexValue(ByteBuffer buffer)
toHexValue
public static String toHexValue(long l)
toHexValue
public static String toHexValue(int i)
toHexValue
public static String toHexValue(short s)
toHexValue
public static String toHexValue(byte b)
getIntRandom
public static int getIntRandom(int i)
getIntRandom
public static int getIntRandom()