public class NumberUtil
extends java.lang.Object
Constructor and Description |
---|
NumberUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
format(double number,
java.lang.String format)
Return the parameter number formatted according to the parameter
FormatString . |
static java.lang.String |
format(java.lang.Double number,
java.lang.String format)
Return the parameter number formatted according to the parameter
FormatString . |
static java.lang.String |
format(float number,
java.lang.String format)
Return the parameter number formatted according to the parameter
FormatString . |
static java.lang.String |
format(java.lang.Float number,
java.lang.String format)
Return the parameter number formatted according to the parameter
FormatString . |
static java.lang.String |
format(java.lang.Integer number,
java.lang.String format)
Return the parameter number formatted according to the parameter
FormatString . |
static java.lang.String |
format(int number,
java.lang.String format)
Return the parameter number formatted according to the parameter
FormatString . |
public static java.lang.String format(int number, java.lang.String format)
FormatString
. This
method is used to implement the format
functionality, but it
can also be used to format arbitrary numbers programmatically.number
- The number to formatformat
- The format to apply. See FormatString
public static java.lang.String format(float number, java.lang.String format)
FormatString
. This
method is used to implement the format
functionality, but it
can also be used to format arbitrary numbers programmatically.number
- The number to formatformat
- The format to apply. See FormatString
public static java.lang.String format(double number, java.lang.String format)
FormatString
. This
method is used to implement the format
functionality, but it
can also be used to format arbitrary numbers programmatically.number
- The number to formatformat
- The format to apply. See FormatString
public static java.lang.String format(java.lang.Integer number, java.lang.String format)
FormatString
. This
method is used to implement the format
functionality, but it
can also be used to format arbitrary numbers programmatically.number
- The number to formatformat
- The format to apply. See FormatString
public static java.lang.String format(java.lang.Float number, java.lang.String format)
FormatString
. This
method is used to implement the format
functionality, but it
can also be used to format arbitrary numbers programmatically.number
- The number to formatformat
- The format to apply. See FormatString
public static java.lang.String format(java.lang.Double number, java.lang.String format)
FormatString
. This
method is used to implement the format
functionality, but it
can also be used to format arbitrary numbers programmatically.number
- The number to formatformat
- The format to apply. See FormatString