|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.pentec.util.AFormat
public class AFormat
AFormat is the ADAPT number formatter. AFormat instantiates standard Java text formatters, and uses its own format method to select which formatter to use based on the input.
| Field Summary | |
|---|---|
private static java.text.NumberFormat |
numFormatter
Java NumberFormat formatter for floating decimal point |
private static java.text.DecimalFormat |
scientificFormatter
Java DecimalFormat formatter for scientific notation |
| Constructor Summary | |
|---|---|
AFormat()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
format(double d)
Convert a double precision number to a string with 2 digits after the decimal point. |
static java.lang.String |
format(double d,
int iNumFracDigits)
Return a string for displaying the specified number, with a variable number of digits after the decimal point. |
static java.lang.String |
format(double d,
int iNumFracDigits,
boolean useE)
Return a string for displaying the specified number, with a variable number of digits after the decimal point. |
static java.lang.String |
formatE(double d,
int iNumFracDigits)
Return a string for displaying the specified number, with a variable number of digits after the decimal point, using scientific notation. |
static java.lang.String |
toBinString(short s)
|
static java.lang.String |
toHexString(short s)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static java.text.NumberFormat numFormatter
private static java.text.DecimalFormat scientificFormatter
| Constructor Detail |
|---|
public AFormat()
| Method Detail |
|---|
public static java.lang.String format(double d)
d - the double precision number to format
public static java.lang.String format(double d,
int iNumFracDigits)
d - the double precision number to formatiNumFracDigits - the number of digits after the decimal point
public static java.lang.String format(double d,
int iNumFracDigits,
boolean useE)
d - the double precision number to formatiNumFracDigits - the number of digits after the decimal pointuseE - if true use scientific notation for small and large numbers
public static java.lang.String formatE(double d,
int iNumFracDigits)
d - the double precision number to formatiNumFracDigits - the number of digits after the decimal point
public static java.lang.String toBinString(short s)
public static java.lang.String toHexString(short s)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||