public class NumberUtil extends Object
Constructor and Description |
---|
NumberUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
numberToString(double number)
Translate a number to an indexable string
|
static String |
numberToString(float number)
Translate a number to an indexable string
|
static String |
numberToString(int number)
Translate a number to an indexable string
|
static String |
numberToString(long number)
Translate a number to an indexable string
|
static Object |
stringToNumber(String number)
Translate an indexable string to a number
|
static String |
trimZeros(String input)
Removes zeros from the end of the string but only from fractional part
if string ends with dot after first operation, we remove dot as well.
|
public static String numberToString(int number)
number
- public static String numberToString(long number)
number
- public static String numberToString(float number)
number
- public static String numberToString(double number)
number
- public static String trimZeros(String input)
input
- Copyright © 2016. All Rights Reserved.