wt.projmgmt.resource
Class Currency

java.lang.Object
  extended bywt.projmgmt.resource.Currency
All Implemented Interfaces:
Externalizable, Serializable

public class Currency
extends Object
implements Externalizable

Currency,/code> represents a localized currency.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static int CURRENCY_POSITION
          

Supported API: false
private static String CURRENCY_SEPARATOR
           
static String CURRENCY_SYMBOL
          

Supported API: false
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static double PRECISION
           
private static String PREFIX_CURRENCY
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  double value
           
 
Constructor Summary
Currency()
          

Supported API: true
Currency(double value)
          

Supported API: true
 
Method Summary
 Currency copy()
          

Supported API: false
 double doubleValue()
          

Supported API: true
 boolean equals(Object object)
          

Supported API: false
static Currency getCurrency(String str)
          

Supported API: true
 int hashCode()
          

Supported API: false
static double parseCurrency(String str)
          

Supported API: true
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(Currency thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 String toString()
          Returns a localized string representation of the amount contained in the currency object.
 String toString(String pattern)
          Returns a string representation of the amount contained in the currency object according with the pattern passed as argument.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

value

private double value

CURRENCY_SYMBOL

public static final String CURRENCY_SYMBOL


Supported API: false


CURRENCY_POSITION

public static final int CURRENCY_POSITION


Supported API: false


serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

PRECISION

private static final double PRECISION
See Also:
Constant Field Values

PREFIX_CURRENCY

private static final String PREFIX_CURRENCY
See Also:
Constant Field Values

CURRENCY_SEPARATOR

private static final String CURRENCY_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

Currency

public Currency()


Supported API: true


Currency

public Currency(double value)


Supported API: true

Parameters:
value -
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(Currency thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

toString

public String toString()
Returns a localized string representation of the amount contained in the currency object.

Supported API: false

Returns:
String

equals

public boolean equals(Object object)


Supported API: false

Parameters:
object -
Returns:
boolean

hashCode

public int hashCode()


Supported API: false

Returns:
int

copy

public Currency copy()


Supported API: false

Returns:
Currency

doubleValue

public double doubleValue()


Supported API: true

Returns:
double

toString

public String toString(String pattern)
Returns a string representation of the amount contained in the currency object according with the pattern passed as argument. In the pattern the pound sign ('#') is a placeholder for a digit, the comma for the grouping separator and the period for the decimal separator.

Supported API: false

Parameters:
pattern -
Returns:
String
See Also:
DecimalFormat

parseCurrency

public static double parseCurrency(String str)
                            throws NumberFormatException


Supported API: true

Parameters:
str -
Returns:
double
Throws:
NumberFormatException

getCurrency

public static Currency getCurrency(String str)
                            throws NumberFormatException


Supported API: true

Parameters:
str -
Returns:
Currency
Throws:
NumberFormatException