public final class CurrencyDataImpl extends DefaultCurrencyData
Modifier and Type | Field and Description |
---|---|
static int |
DEPRECATED_FLAG
Public so CurrencyListGenerator can get to them.
|
static int |
POS_FIXED_FLAG |
static int |
POS_SUFFIX_FLAG |
static int |
PRECISION_MASK |
static int |
SPACE_FORCED_FLAG |
static int |
SPACING_FIXED_FLAG |
Constructor and Description |
---|
CurrencyDataImpl(String currencyCode,
String currencySymbol,
int flagsAndPrecision)
Create a new CurrencyData whose portable symbol is the same as its local
symbol.
|
CurrencyDataImpl(String currencyCode,
String currencySymbol,
int flagsAndPrecision,
String portableCurrencySymbol)
Create a new CurrencyData whose portable symbol is the same as its local
symbol.
|
CurrencyDataImpl(String currencyCode,
String currencySymbol,
int flagsAndPrecision,
String portableCurrencySymbol,
String simpleCurrencySymbol) |
Modifier and Type | Method and Description |
---|---|
int |
getDefaultFractionDigits()
Returns the default number of decimal positions for this currency.
|
static int |
getDefaultFractionDigits(int flagsAndPrecision) |
String |
getPortableCurrencySymbol()
Returns the default symbol to use for this currency, intended to be
recognizable in most locales.
|
String |
getSimpleCurrencySymbol()
Returns the simplest symbol to use for this currency, which is not guaranteed
to be unique -- for example, this might return "$" for both USD and CAD.
|
boolean |
isDeprecated()
Returns true if this currency is deprecated and should not be returned by
default in currency lists.
|
static boolean |
isDeprecated(int flagsAndPrecision) |
boolean |
isSpaceForced()
Returns true if there should always be a space between the currency symbol
and the number, false if there should be no space.
|
static boolean |
isSpaceForced(int flagsAndPrecision) |
boolean |
isSpacingFixed()
Returns true if the spacing between the currency symbol and the number is
fixed regardless of locale defaults.
|
static boolean |
isSpacingFixed(int flagsAndPrecision) |
boolean |
isSymbolPositionFixed()
Returns true if the position of the currency symbol relative to the number
is fixed regardless of locale defaults.
|
static boolean |
isSymbolPositionFixed(int flagsAndPrecision) |
boolean |
isSymbolPrefix()
Returns true if the currency symbol should go before the number, false if
it should go after the number.
|
static boolean |
isSymbolPrefix(int flagsAndPrecision) |
getCurrencyCode, getCurrencySymbol
public static final int DEPRECATED_FLAG
public static final int POS_FIXED_FLAG
public static final int POS_SUFFIX_FLAG
public static final int PRECISION_MASK
public static final int SPACE_FORCED_FLAG
public static final int SPACING_FIXED_FLAG
public CurrencyDataImpl(String currencyCode, String currencySymbol, int flagsAndPrecision)
public CurrencyDataImpl(String currencyCode, String currencySymbol, int flagsAndPrecision, String portableCurrencySymbol)
public static int getDefaultFractionDigits(int flagsAndPrecision)
public static boolean isDeprecated(int flagsAndPrecision)
public static boolean isSpaceForced(int flagsAndPrecision)
public static boolean isSpacingFixed(int flagsAndPrecision)
public static boolean isSymbolPositionFixed(int flagsAndPrecision)
public static boolean isSymbolPrefix(int flagsAndPrecision)
public int getDefaultFractionDigits()
CurrencyData
getDefaultFractionDigits
in interface CurrencyData
getDefaultFractionDigits
in class DefaultCurrencyData
public String getPortableCurrencySymbol()
CurrencyData
CurrencyData.getCurrencySymbol()
.getPortableCurrencySymbol
in interface CurrencyData
getPortableCurrencySymbol
in class DefaultCurrencyData
public String getSimpleCurrencySymbol()
CurrencyData
CurrencyData.getCurrencySymbol()
.getSimpleCurrencySymbol
in interface CurrencyData
getSimpleCurrencySymbol
in class DefaultCurrencyData
public boolean isDeprecated()
CurrencyData
isDeprecated
in interface CurrencyData
isDeprecated
in class DefaultCurrencyData
public boolean isSpaceForced()
CurrencyData
CurrencyData.isSpacingFixed()
returns true.isSpaceForced
in interface CurrencyData
isSpaceForced
in class DefaultCurrencyData
public boolean isSpacingFixed()
CurrencyData
CurrencyData.isSpaceForced()
.isSpacingFixed
in interface CurrencyData
isSpacingFixed
in class DefaultCurrencyData
public boolean isSymbolPositionFixed()
CurrencyData
CurrencyData.isSymbolPrefix()
.isSymbolPositionFixed
in interface CurrencyData
isSymbolPositionFixed
in class DefaultCurrencyData
public boolean isSymbolPrefix()
CurrencyData
CurrencyData.isSymbolPositionFixed()
is true.isSymbolPrefix
in interface CurrencyData
isSymbolPrefix
in class DefaultCurrencyData
Copyright © 2016. All rights reserved.