public class PCurrencyFormatter extends DecimalFormat
PCurrencyFormatter
is a concrete subclass of
DecimalFormat
that formats currency numbers based on currency
instead of default locale of the system.
There is no public constructor for PCurrencyFormatter
.
To obtain a PCurrencyFormatter
for a specific currency,
call getInstance(int currencyID)
.
NumberFormat.Field
FRACTION_FIELD, INTEGER_FIELD
Modifier and Type | Method and Description |
---|---|
static PCurrencyFormatter |
getInstance(int currencyID)
Gets an instance of PCurrencyFormatter for a specific currency ID.
|
static int |
getRoundingMethod(int currencyID)
Gets the rounding method for a specific currency defined in the currency resource
in beid configuration object stored at Portal server.
|
static boolean |
isCurrencyID(int currencyID)
Checks if the currency ID is a valid ISO currency ID that is recognized
by Portal.
|
static void |
setContext(PortalContext connection)
Sets the PortalContext.
|
applyLocalizedPattern, applyPattern, clone, equals, format, format, format, formatToCharacterIterator, getCurrency, getDecimalFormatSymbols, getGroupingSize, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getMultiplier, getNegativePrefix, getNegativeSuffix, getPositivePrefix, getPositiveSuffix, getRoundingMode, hashCode, isDecimalSeparatorAlwaysShown, isParseBigDecimal, parse, setCurrency, setDecimalFormatSymbols, setDecimalSeparatorAlwaysShown, setGroupingSize, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setMultiplier, setNegativePrefix, setNegativeSuffix, setParseBigDecimal, setPositivePrefix, setPositiveSuffix, setRoundingMode, toLocalizedPattern, toPattern
format, format, getAvailableLocales, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setParseIntegerOnly
format, parseObject
public static void setContext(PortalContext connection)
connection
- A PortalContext object.public static int getRoundingMethod(int currencyID)
currencyID
- the currency IDsetContext() has
not been called to set the connection, returns -1.
public static boolean isCurrencyID(int currencyID)
currencyID
- the currency ID to evaluate.public static PCurrencyFormatter getInstance(int currencyID)
currencyID
- The currency ID.Copyright © 2003, 2023, Oracle and/or its affiliates.