|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Number | +--javatools.util.FormattedNumber
It's a java.lang.Number, except in the fact it returns its "toString" value in a formatted way.
Field Summary | |
protected java.text.DecimalFormat |
formatter
The formatter. |
protected java.lang.Number |
num
The number to use. |
Constructor Summary | |
FormattedNumber()
Creates new FormattedNumber |
Method Summary | |
byte |
byteValue()
Returns the byte value for out num object. |
double |
doubleValue()
Returns the double value for out num object. |
boolean |
equals(java.lang.Object obj)
Checks if an object is equal to our num object. |
float |
floatValue()
Returns the float value for out num object. |
java.text.DecimalFormat |
getFormatter()
Returns the currently using formatter. |
int |
hashCode()
Returns the hash code for the num object. |
int |
intValue()
Returns the int value for out num object. |
long |
longValue()
Returns the long value for out num object. |
void |
setFormatter(java.text.DecimalFormat pFormatter)
Sets the formatter to use. |
short |
shortValue()
Returns the short value for out num object. |
java.lang.String |
toString()
Returns a formatted string representing the contained number. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.Number num
protected java.text.DecimalFormat formatter
Constructor Detail |
public FormattedNumber()
Method Detail |
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object to check.
true
: the objects are equal;
false
: the objects are NOT equal.public byte byteValue()
byteValue
in class java.lang.Number
public double doubleValue()
doubleValue
in class java.lang.Number
public float floatValue()
floatValue
in class java.lang.Number
public int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public short shortValue()
shortValue
in class java.lang.Number
public void setFormatter(java.text.DecimalFormat pFormatter)
pFormatter
- The formatter to use.public java.text.DecimalFormat getFormatter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |