2004.04.29


com.jdc.math
Class Currency

java.lang.Object
  |
  +--java.lang.Number
        |
        +--com.jdc.math.Number
              |
              +--com.jdc.math.Decimal
                    |
                    +--com.jdc.math.Currency
All Implemented Interfaces:
DefaultLocale, Serializable

public class Currency
extends Decimal

Author:
n0119645 To change this generated comment edit the template variable "typecomment": Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to Window>Preferences>Java>Code Generation.
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.jdc.util.DefaultLocale
DEFAULT_LOCALE
 
Constructor Summary
Currency()
          Constructs a new Currency object with a value of zero, i.e.
Currency(double value)
          Constructs a new Currency object for the specified double value.
Currency(long value)
          Constructs a new Currency object for the specified long value.
Currency(String value)
          Constructs a new Currency object for the specified String value.
 
Method Summary
 String format()
          Returns a formatted String representation of this Currency object.
 String format(boolean addCurrencySymbol)
          Returns a formatted String representation of this Currency object.
static void main(String[] args)
          Executes the unit tests for the Currency class.
 
Methods inherited from class com.jdc.math.Decimal
add, add, add, byteValue, divide, divide, divide, doubleValue, equals, floatValue, getLocale, hashCode, intValue, isNaN, longValue, multiply, multiply, multiply, scale, set, set, set, setLocale, setScale, setScale, shortValue, subtract, subtract, subtract, toBigDecimal, toString, zero
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Currency

public Currency()
Constructs a new Currency object with a value of zero, i.e. 0.


Currency

public Currency(double value)
Constructs a new Currency object for the specified double value.


Currency

public Currency(long value)
Constructs a new Currency object for the specified long value.


Currency

public Currency(String value)
Constructs a new Currency object for the specified String value.

Method Detail

format

public String format()
Returns a formatted String representation of this Currency object.

Overrides:
format in class Decimal
Returns:
A formatted String representation of this Currency object.

format

public String format(boolean addCurrencySymbol)
Returns a formatted String representation of this Currency object.

Returns:
A formatted String representation of this Currency object.

main

public static void main(String[] args)
Executes the unit tests for the Currency class.


2004.04.29



Copyright © 2004 J. Damon & Co.; All Rights Reserved WorldWide.