|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.xui.helper.NumberFormatter
public class NumberFormatter
A utility to help format numbers in accordance with the current Locale
Copyright (c) Xoetrope Ltd., 1998-2004
$Revision: 2.2 $
| Constructor Summary | |
|---|---|
NumberFormatter()
Create a new formatter |
|
| Method Summary | |
|---|---|
static java.lang.String |
format(double input)
Convert a double value to a string |
static java.lang.String |
format(long input)
Convert a long value to a string |
static java.lang.String |
format(java.lang.Object input)
Convert a Object (Double,Float etc) value to a string |
static java.lang.String |
formatDouble(double input)
Convert a double value to a string |
java.lang.String |
formatNumber()
Format a number |
static char |
getDecimalSeparator()
Get the current decimal separator character |
static java.lang.Number |
parse(java.lang.String input)
Convert a string to a Number |
static double |
parseDouble(java.lang.String input)
Convert a string to a double value |
static double |
parseDouble(java.lang.String input,
char decimalSeparator,
char groupSeparator)
Convert a string to a double value |
static float |
parseFloat(java.lang.String input)
Convert a string to a float value |
static int |
parseInt(java.lang.String input)
Convert a string to an int value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NumberFormatter()
| Method Detail |
|---|
public java.lang.String formatNumber()
public static java.lang.Number parse(java.lang.String input)
input - thge input string
public static double parseDouble(java.lang.String input)
input - the input string representation of the number
public static double parseDouble(java.lang.String input,
char decimalSeparator,
char groupSeparator)
input - the input string representation of the number
public static int parseInt(java.lang.String input)
input - the input string representation of the number
public static float parseFloat(java.lang.String input)
input - the input string representation of the number
public static char getDecimalSeparator()
public static java.lang.String format(double input)
input - the input numeric value
public static java.lang.String formatDouble(double input)
input - the input numeric value
public static java.lang.String format(long input)
input - the input numeric value
public static java.lang.String format(java.lang.Object input)
input - the input numeric value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||