|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cip4.jdflib.util.NumberFormatter
public class NumberFormatter
class to format integers, longs, doubles etc.
| Constructor Summary | |
|---|---|
NumberFormatter()
set up the defaults |
|
| Method Summary | |
|---|---|
String |
formatDouble(double d)
returns a formatted double. |
String |
formatDouble(double d,
int precision)
returns a formatted double. |
String |
formatInt(int i,
int length)
returns a formatted double. |
void |
setZapp0(boolean zapp0)
if set, remove trailing 0 |
| 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 void setZapp0(boolean zapp0)
zapp0 -
public String formatInt(int i,
int length)
i - the integer to formatlength - maximum precision, depending on value of zapp0, leading 0s are discarded or kept
public String formatDouble(double d,
int precision)
d - the double to formatprecision - maximum precision, depending on value of zapp0, trailing 0s are discarded or kept
public String formatDouble(double d)
d - the double to format
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||