|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.northwestern.at.utils.Formatters
public class Formatters
Formatting utilties.
| Method Summary | |
|---|---|
static java.lang.String |
formatDouble(double x,
int d)
Formats a double. |
static java.lang.String |
formatFloat(float x,
int d)
Formats a float. |
static java.lang.String |
formatIntegerWithCommas(int n)
Formats an integer with commas. |
static java.lang.String |
formatLongWithCommas(long n)
Formats a long with commas. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String formatIntegerWithCommas(int n)
n - The number.
public static java.lang.String formatLongWithCommas(long n)
n - The number.
public static java.lang.String formatFloat(float x,
int d)
The formatted number always has a minimum of one digit before the decimal point, and a fixed specified number of digits after the decimal point.
x - The number.d - Number of digits after the decimal point.
public static java.lang.String formatDouble(double x,
int d)
The formatted number always has a minimum of one digit before the decimal point, and a fixed specified number of digits after the decimal point.
x - The number.d - Number of digits after the decimal point.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||