2 **********************************************************************
3 * Copyright (c) 2004-2010, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
7 * Created: April 12, 2004
9 **********************************************************************
11 package com.ibm.icu.util;
15 * An amount of currency, consisting of a Number and a Currency.
16 * CurrencyAmount objects are immutable.
18 * @see java.lang.Number
23 public class CurrencyAmount extends Measure {
26 * Constructs a new object given a number and a currency.
27 * @param number the number
28 * @param currency the currency
31 public CurrencyAmount(Number number, Currency currency) {
32 super(number, currency);
36 * Constructs a new object given a double value and a currency.
37 * @param number a double value
38 * @param currency the currency
41 public CurrencyAmount(double number, Currency currency) {
42 super(new Double(number), currency);
46 * Returns the currency of this object.
47 * @return this object's Currency
50 public Currency getCurrency() {
51 return (Currency) getUnit();