2 **********************************************************************
\r
3 * Copyright (c) 2004-2010, 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
15 * An amount of currency, consisting of a Number and a Currency.
\r
16 * CurrencyAmount objects are immutable.
\r
18 * @see java.lang.Number
\r
23 public class CurrencyAmount extends Measure {
\r
26 * Constructs a new object given a number and a currency.
\r
27 * @param number the number
\r
28 * @param currency the currency
\r
31 public CurrencyAmount(Number number, Currency currency) {
\r
32 super(number, currency);
\r
36 * Constructs a new object given a double value and a currency.
\r
37 * @param number a double value
\r
38 * @param currency the currency
\r
41 public CurrencyAmount(double number, Currency currency) {
\r
42 super(new Double(number), currency);
\r
46 * Returns the currency of this object.
\r
47 * @return this object's Currency
\r
50 public Currency getCurrency() {
\r
51 return (Currency) getUnit();
\r