com.antelmann.math
Class CurrencyUnit
java.lang.Object
com.antelmann.math.DefaultUnit
com.antelmann.math.CurrencyUnit
- All Implemented Interfaces:
- Unit, Localizable, Wrapped<Currency>, Serializable
public class CurrencyUnit
- extends DefaultUnit
- implements Wrapped<Currency>
a wrapper that allows a currency to be treated as a unit
- Since:
- 04.06.2009, 15:10:44
- Author:
- Holger Antelmann
- See Also:
Money,
Serialized Form
CurrencyUnit
@Deprecated
public CurrencyUnit(Currency c)
- Deprecated. use
asUnit(Currency) instead
- See Also:
asUnit(Currency)
getCurrency
public Currency getCurrency()
getUnitSymbol
@Localized
public String getUnitSymbol()
- Description copied from interface:
Unit
- provides a short symbolic representation of this unit
- Specified by:
getUnitSymbol in interface Unit- Overrides:
getUnitSymbol in class DefaultUnit
unwrap
public Currency unwrap()
- Description copied from interface:
Wrapped
- returns the embedded instance that this wrapper encloses
- Specified by:
unwrap in interface Wrapped<Currency>
fromSymbol
public static CurrencyUnit fromSymbol(String symbol)
asUnit
public static CurrencyUnit asUnit(Currency c)
- preferred method to obtain a CurrencyUnit instance, as it provides the same object for a currency
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads