Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

text::TNumberTranslator Class Reference

Inheritance diagram for text::TNumberTranslator:

text::TAbstractNumberTranslator List of all members.

Public Methods

 TNumberTranslator ()
 Builds a new instance.

 TNumberTranslator (Locale tLOCALE)
double toDouble (String yNUMBER) throws ParseException
float toFloat (String yNUMBER) throws ParseException
int toInt (String yNUMBER) throws ParseException
String toString (double dNUMBER)
String toString (Number tNUMBER)

Public Attributes

NumberFormat tNumberFormat
 Number format.


Detailed Description

Class to convert from numbers to their string representation and vice-versa.

Definition at line 38 of file TNumberTranslator.java.


Constructor & Destructor Documentation

text::TNumberTranslator::TNumberTranslator Locale    tLOCALE [inline]
 

Builds a new instance.

Parameters:
tLOCALE  Locale.

Definition at line 59 of file TNumberTranslator.java.

References text::TNumberTranslator::tNumberFormat.


Member Function Documentation

double text::TNumberTranslator::toDouble String    yNUMBER throws ParseException [inline, virtual]
 

Translates the number in yNUMBER to a double value.

Parameters:
yNUMBER  String with the locale representation of a double value.
Precondition:
yNUMBER represents a double value in the selected locale.
Returns:
A double value corresponding to the number in yNUMBER converted using selected locale.
See also:
TNumberTranslator().

Implements text::TAbstractNumberTranslator.

Definition at line 77 of file TNumberTranslator.java.

References text::TNumberTranslator::tNumberFormat.

float text::TNumberTranslator::toFloat String    yNUMBER throws ParseException [inline, virtual]
 

Translates the number in yNUMBER to a float value.

Parameters:
yNUMBER  String with the locale representation of a float value.
Precondition:
yNUMBER represents a float value in the selected locale.
Returns:
A float value corresponding to the number in yNUMBER converted using selected locale.
See also:
TNumberTranslator().

Implements text::TAbstractNumberTranslator.

Definition at line 90 of file TNumberTranslator.java.

References text::TNumberTranslator::tNumberFormat.

int text::TNumberTranslator::toInt String    yNUMBER throws ParseException [inline, virtual]
 

Translates the number in yNUMBER to a integer value.

Parameters:
yNUMBER  String with the locale representation of a integer value.
Precondition:
yNUMBER represents a integer value in the selected locale.
Returns:
An integer value corresponding to the number in yNUMBER converted using selected locale.
See also:
TNumberTranslator().

Implements text::TAbstractNumberTranslator.

Definition at line 103 of file TNumberTranslator.java.

References text::TNumberTranslator::tNumberFormat.

String text::TNumberTranslator::toString Number    tNUMBER [inline, virtual]
 

Translates the number tNUMBER to its string representation in the selected locale.

Parameters:
tNUMBER  Number.
Returns:
An string with the representation of the number converted using selected locale.
See also:
TNumberTranslator().

Implements text::TAbstractNumberTranslator.

Definition at line 129 of file TNumberTranslator.java.

References text::TNumberTranslator::tNumberFormat.

String text::TNumberTranslator::toString double    dNUMBER [inline, virtual]
 

Translates the number dNUMBER to its string representation in the selected locale.

Parameters:
dNUMBER  Double value.
Returns:
An string with the representation of the double value converted using selected locale.
See also:
TNumberTranslator().

Implements text::TAbstractNumberTranslator.

Definition at line 116 of file TNumberTranslator.java.

References text::TNumberTranslator::tNumberFormat.


The documentation for this class was generated from the following file:
Generated on Mon Oct 13 02:35:28 2003 for MPCL by doxygen1.2.18