public final class NumericUtil extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
bytesToInt(byte[] bytes) |
static long |
bytesToLong(byte[] bytes) |
static int |
compareNumber(Object first,
Number second)
Compare object with a number, the object should be a number,
or it can be converted to a BigDecimal
|
static Object |
convertToNumber(Object value) |
static long |
doubleToSortableLong(double val) |
static int |
floatToSortableInt(float val) |
static byte[] |
intToBytes(int value) |
static boolean |
isNumber(Class<?> clazz) |
static boolean |
isNumber(Object value) |
static byte[] |
longToBytes(long value) |
static byte[] |
numberToSortableBytes(Number number) |
static Number |
sortableBytesToNumber(byte[] bytes,
Class<?> clazz) |
static long |
sortableDoubleBits(long bits) |
static int |
sortableFloatBits(int bits) |
static float |
sortableIntToFloat(int val) |
static double |
sortableLongToDouble(long val) |
public static long doubleToSortableLong(double val)
public static double sortableLongToDouble(long val)
public static int floatToSortableInt(float val)
public static float sortableIntToFloat(int val)
public static long sortableDoubleBits(long bits)
public static int sortableFloatBits(int bits)
public static byte[] numberToSortableBytes(Number number)
public static byte[] longToBytes(long value)
public static long bytesToLong(byte[] bytes)
public static byte[] intToBytes(int value)
public static int bytesToInt(byte[] bytes)
public static boolean isNumber(Object value)
public static boolean isNumber(Class<?> clazz)
Copyright © 2018. All rights reserved.