Example usage for Java org.apache.lucene.util NumericUtils fields, constructors, methods, implement or subclass
The text is from its open source code.
long | doubleToSortableLong(double value) Converts a double value to a sortable signed long . |
int | floatToSortableInt(float value) Converts a float value to a sortable signed int . |
void | intToSortableBytes(int value, byte[] result, int offset) Encodes an integer value such that unsigned byte order comparison is consistent with Integer#compare(int,int) |
void | longToSortableBytes(long value, byte[] result, int offset) Encodes an long value such that unsigned byte order comparison is consistent with Long#compare(long,long) |
int | sortableBytesToInt(byte[] encoded, int offset) Decodes an integer value previously written with #intToSortableBytes |
float | sortableIntToFloat(int encoded) Converts a sortable int back to a float . |
double | sortableLongToDouble(long encoded) Converts a sortable long back to a double . |