All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ibm.icu.util.CurrencyAmount Maven / Gradle / Ivy

Go to download

Vaadin is a web application framework for Rich Internet Applications (RIA). Vaadin enables easy development and maintenance of fast and secure rich web applications with a stunning look and feel and a wide browser support. It features a server-side architecture with the majority of the logic running on the server. Ajax technology is used at the browser-side to ensure a rich and interactive user experience.

There is a newer version: 1.2.0
Show newest version
/*
**********************************************************************
* Copyright (c) 2004-2010, International Business Machines
* Corporation and others.  All Rights Reserved.
**********************************************************************
* Author: Alan Liu
* Created: April 12, 2004
* Since: ICU 3.0
**********************************************************************
*/
package com.ibm.icu.util;


/**
 * An amount of currency, consisting of a Number and a Currency.
 * CurrencyAmount objects are immutable.
 *
 * @see java.lang.Number
 * @see Currency
 * @author Alan Liu
 * @stable ICU 3.0
 */
public class CurrencyAmount extends Measure {
    
    /**
     * Constructs a new object given a number and a currency.
     * @param number the number
     * @param currency the currency
     * @stable ICU 3.0
     */
    public CurrencyAmount(Number number, Currency currency) {
        super(number, currency);
    }

    /**
     * Constructs a new object given a double value and a currency.
     * @param number a double value
     * @param currency the currency
     * @stable ICU 3.0
     */
    public CurrencyAmount(double number, Currency currency) {
        super(new Double(number), currency);
    }    
    
    /**
     * Returns the currency of this object.
     * @return this object's Currency
     * @stable ICU 3.0
     */
    public Currency getCurrency() {
        return (Currency) getUnit();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy