|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jstatcom.component.NumberFormatTypes
public abstract class NumberFormatTypes
The NumberFormatTypes class contains formatters that are used by JStatCom components
to guarantee a consistent formatting behaviour. This class can be extended to provide
special number formatters in certain contexts. It contains an enumeration of
common formatters.
The defined operators override getInstance to initialize an instance
of the respective number format with a certain behaviour.
NumberFormatTypes, always use the == operator. This is
save, because they are Singletons (Gamma et al., 1995).
| Field Summary | |
|---|---|
static NumberFormatTypes |
DEFAULT
The default NumberFormatType to be used for representing doubles. |
static NumberFormatTypes |
SCIENTIFIC
The scientific notation NumberFormatType. |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Override prevention method to enforce a.equals(b) if and only if a==b. |
abstract java.text.NumberFormat |
getInstance()
Returns an instance of the respective NumberFormat. |
java.lang.String |
getName()
Gets the name of this type. |
int |
hashCode()
Override prevention method invokes super method. |
java.lang.String |
toString()
Gets a string representing this type, do not use for comparisons. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final NumberFormatTypes DEFAULT
NumberFormatType to be used for representing doubles.
It displays numbers with Locale.ENGLISH, no grouping and a given precision,
for example 2.345, 1.000.
public static final NumberFormatTypes SCIENTIFIC
NumberFormatType. The applied pattern is
"0.###E0. It displays numbers with Locale.ENGLISH,
no grouping and a given precision, for example 1.234E-2, 1.000E3.
| Method Detail |
|---|
public final boolean equals(java.lang.Object o)
a.equals(b) if and only if a==b.
equals in class java.lang.Objecto - object to compare with
true if equal, false otherwisepublic abstract java.text.NumberFormat getInstance()
public final java.lang.String getName()
public final int hashCode()
hashCode in class java.lang.Objectpublic final java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||