|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.util.AbstractXmlObject
com.waveset.msgcat.MessageParameter
com.waveset.msgcat.Number
An object that encapsulates a number that can be passed as a parameter to a localizable Message. Localization is not performed until called upon by the Catalog.
Field Summary | |
static java.lang.String |
ATT_IS_LONG
|
static java.lang.String |
ATT_NUMBER
|
static java.lang.String |
ATT_STYLE
|
static java.lang.String |
code_id
|
static int |
CURRENCY
|
static java.lang.String |
ELEMENT
|
static java.lang.String |
INVALID_NUMBER
|
static int |
NUMBER
|
static int |
PERCENT
|
Fields inherited from class com.waveset.util.AbstractXmlObject |
_trace |
Constructor Summary | |
Number(double number)
Create a new localizable number (real) parameter with default style set to NUMBER. |
|
Number(double number,
int style)
Create a new localizable number (real) parameter. |
|
Number(org.w3c.dom.Element e)
Construct number from XML. |
|
Number(long number)
Create a new localizable number (integer) parameter with default style set to NUMBER. |
|
Number(long number,
int style)
Create a new localizable number (integer) parameter. |
|
Number(java.lang.String number)
Create a new localizable number parameter from a string. |
|
Number(java.lang.String number,
int style)
Create a new localizable number parameter from a string. |
Method Summary | |
protected void |
addSubclassAttributes(java.lang.StringBuffer b)
|
protected void |
addSubclassElements(java.lang.StringBuffer b,
int indent)
|
boolean |
equals(java.lang.Object o)
Determine equivalence. |
static java.lang.String |
format(double number,
int style,
java.util.Locale locale)
|
static java.lang.String |
format(double number,
java.util.Locale locale)
|
static java.lang.String |
format(long number,
int style,
java.util.Locale locale)
|
static java.lang.String |
format(long number,
java.util.Locale locale)
|
java.lang.String |
getElementName()
Get the xml element name. |
protected boolean |
getIsLong()
Get the flag that indicates whether or not the number is treated as a long. |
protected double |
getNumber()
Get the number. |
protected int |
getStyle()
Get the style. |
protected void |
parseSubclassAttributes(org.w3c.dom.Element e)
|
protected void |
parseSubclassElements(org.w3c.dom.Element e)
|
void |
parseXml(org.w3c.dom.Element e)
|
protected void |
setIsLong(boolean is_long)
Set whether or not the number is to be treated as a long. |
protected void |
setNumber(double number)
Set the number. |
protected void |
setStyle(int style)
Set the style; |
java.lang.String |
toString()
Localize this date/time to the default locale. |
java.lang.String |
toString(java.util.Locale locale)
Localize this number. |
java.lang.String |
toXml()
Serialize this object as an XML string. |
void |
toXml(java.lang.StringBuffer b,
int indent)
Serialize this object as an XML string. |
Methods inherited from class com.waveset.util.AbstractXmlObject |
addXmlHeader, cloneObject, dump, dumpFile, getReference, println, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String ELEMENT
public static final int NUMBER
public static final int CURRENCY
public static final int PERCENT
public static final java.lang.String INVALID_NUMBER
public static final java.lang.String ATT_NUMBER
public static final java.lang.String ATT_IS_LONG
public static final java.lang.String ATT_STYLE
Constructor Detail |
public Number(org.w3c.dom.Element e) throws WavesetException
public Number(long number, int style)
number
- The number parameter.style
- Indicates the format style for the number.public Number(long number)
number
- The number parameter.public Number(double number, int style)
number
- The number parameter.style
- Indicates the format style for the number.public Number(double number)
number
- The number parameter.public Number(java.lang.String number, int style)
number
- The number parameter.style
- Indicates the format style for the number.public Number(java.lang.String number)
number
- The number parameter.Method Detail |
public static java.lang.String format(double number, int style, java.util.Locale locale)
public static java.lang.String format(double number, java.util.Locale locale)
public static java.lang.String format(long number, int style, java.util.Locale locale)
public static java.lang.String format(long number, java.util.Locale locale)
public java.lang.String getElementName()
getElementName
in interface XmlObject
getElementName
in class AbstractXmlObject
protected double getNumber()
protected boolean getIsLong()
protected int getStyle()
protected void setNumber(double number)
number
- The number parameter.protected void setIsLong(boolean is_long)
is_long
- The flag.protected void setStyle(int style)
style
- Indicates the format style for the number.public java.lang.String toString(java.util.Locale locale)
toString
in class MessageParameter
locale
- The locale to use.public java.lang.String toString()
toString
in class MessageParameter
protected void addSubclassAttributes(java.lang.StringBuffer b)
protected void addSubclassElements(java.lang.StringBuffer b, int indent)
protected void parseSubclassAttributes(org.w3c.dom.Element e) throws WavesetException
WavesetException
protected void parseSubclassElements(org.w3c.dom.Element e) throws WavesetException
WavesetException
public void toXml(java.lang.StringBuffer b, int indent)
toXml
in interface XmlObject
toXml
in class AbstractXmlObject
public void parseXml(org.w3c.dom.Element e) throws WavesetException
WavesetException
public java.lang.String toXml()
toXml
in interface XmlObject
toXml
in class AbstractXmlObject
public boolean equals(java.lang.Object o)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |