com.ibm.icu.util
Class LocaleData
public final class LocaleData
A class for accessing miscelleneous data in the locale bundles
ALT_QUOTATION_END
public static final int ALT_QUOTATION_END
ALT_QUOTATION_START
public static final int ALT_QUOTATION_START
DELIMITER_COUNT
public static final int DELIMITER_COUNT
ES_AUXILIARY
public static final int ES_AUXILIARY
ES_COUNT
public static final int ES_COUNT
ES_STANDARD
public static final int ES_STANDARD
QUOTATION_END
public static final int QUOTATION_END
QUOTATION_START
public static final int QUOTATION_START
getDelimiter
public String getDelimiter(int type)
Retrieves a delimiter string from the locale data.
type
- The type of delimiter string desired. Currently,
the valid choices are QUOTATION_START, QUOTATION_END,
ALT_QUOTATION_START, or ALT_QUOTATION_END.
- The desired delimiter string.
getExemplarSet
public static UnicodeSet getExemplarSet(ULocale locale,
int options)
Returns the set of exemplar characters for a locale.
locale
- Locale for which the exemplar character set
is to be retrieved.options
- Bitmask for options to apply to the exemplar pattern.
Specify zero to retrieve the exemplar set as it is
defined in the locale data. Specify
UnicodeSet.CASE to retrieve a case-folded exemplar
set. See UnicodeSet.applyPattern(String,int)
for a complete list of valid options. The
IGNORE_SPACE bit is always set, regardless of the
value of 'options'.
- The set of exemplar characters for the given locale.
getExemplarSet
public UnicodeSet getExemplarSet(int options,
int extype)
Returns the set of exemplar characters for a locale.
options
- Bitmask for options to apply to the exemplar pattern.
Specify zero to retrieve the exemplar set as it is
defined in the locale data. Specify
UnicodeSet.CASE to retrieve a case-folded exemplar
set. See UnicodeSet.applyPattern(String,int)
for a complete list of valid options. The
IGNORE_SPACE bit is always set, regardless of the
value of 'options'.extype
- The type of exemplar set to be retrieved,
ES_STANDARD or ES_AUXILIARY
- The set of exemplar characters for the given locale.
getInstance
public static final LocaleData getInstance()
Gets the LocaleData object associated with the default locale
getInstance
public static final LocaleData getInstance(ULocale locale)
Gets the LocaleData object associated with the ULocale specified in locale
locale
- Locale with thich the locale data object is associated.
getMeasurementSystem
public static final LocaleData.MeasurementSystem getMeasurementSystem(ULocale locale)
Returns the measurement system used in the locale specified by the locale.
locale
- The locale for which the measurement system to be retrieved.
- MeasurementSystem the measurement system used in the locale.
getNoSubstitute
public boolean getNoSubstitute()
Gets the "no substitute" behavior of this locale data object.
- Value for the no substitute behavior. If TRUE,
methods of this locale data object will return
an error when no data is available for that method,
given the locale ID supplied to the constructor.
getPaperSize
public static final LocaleData.PaperSize getPaperSize(ULocale locale)
Returns the size of paper used in the locale. The paper sizes returned are always in
milli-meters.
locale
- The locale for which the measurement system to be retrieved.
- The paper size used in the locale
setNoSubstitute
public void setNoSubstitute(boolean setting)
Sets the "no substitute" behavior of this locale data object.
setting
- Value for the no substitute behavior. If TRUE,
methods of this locale data object will return
an error when no data is available for that method,
given the locale ID supplied to the constructor.
Copyright (c) 2006 IBM Corporation and others.