2 **********************************************************************
\r
3 * Copyright (c) 2004-2006, International Business Machines
\r
4 * Corporation and others. All Rights Reserved.
\r
5 **********************************************************************
\r
7 * Created: April 12, 2004
\r
9 **********************************************************************
\r
11 package com.ibm.icu.util;
\r
13 import java.lang.Number;
\r
16 * An amount of currency, consisting of a Number and a Currency.
\r
17 * CurrencyAmount objects are immutable.
\r
19 * @see java.lang.Number
\r
24 public class CurrencyAmount extends Measure {
\r
27 * Constructs a new object given a number and a currency.
\r
28 * @param number the number
\r
29 * @param currency the currency
\r
32 public CurrencyAmount(Number number, Currency currency) {
\r
33 super(number, currency);
\r
37 * Constructs a new object given a double value and a currency.
\r
38 * @param number a double value
\r
39 * @param currency the currency
\r
42 public CurrencyAmount(double number, Currency currency) {
\r
43 super(new Double(number), currency);
\r
47 * Returns the currency of this object.
\r
48 * @return this object's Currency
\r
51 public Currency getCurrency() {
\r
52 return (Currency) getUnit();
\r