de.rowa.posps.client.data
Class PospsCurrencyFormat
java.lang.Object
de.rowa.posps.client.data.PospsCurrencyFormat
public class PospsCurrencyFormat
- extends java.lang.Object
Format and parse monetary amounts of posps elements. posps represents all
monetary amounts in the smallest unit of the currency of the country in which
the sale is carried out. The amount is given without fractions. This class
helps with converting these values from and to BigDecimals. Other than the
currency formats returned by NumberFormat
, this class does not
deal with the currency symbol.
- Author:
- Michael Koch
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static PospsCurrencyFormat getInstance()
- Returns:
- New currency format for the currency taken from the default locale.
getInstance
public static PospsCurrencyFormat getInstance(PospsCountryCode countryCode)
getInstance
public static PospsCurrencyFormat getInstance(java.util.Currency currency)
- Parameters:
currency
- The currency which is used to get the fraction digits.
- Returns:
- New currency format for the given currency.
format
public java.lang.StringBuilder format(java.math.BigDecimal amount,
java.lang.StringBuilder appendTo)
format
public java.lang.String format(java.math.BigDecimal amount)
parse
public java.math.BigDecimal parse(long amount)
formatAsBigInteger
public java.math.BigInteger formatAsBigInteger(java.math.BigDecimal amount)
parse
public java.math.BigDecimal parse(java.math.BigInteger integerAmount)
Copyright © 2007-2016 Becton Dickinson. All Rights Reserved.