com.ibm.icu.util
Class LocaleData

java.lang.Object
  extended by com.ibm.icu.util.LocaleData

public final class LocaleData
extends Object

A class for accessing miscelleneous data in the locale bundles

Author:
ram
Status:
Stable ICU 2.8.

Nested Class Summary
static class LocaleData.MeasurementSystem
          Enumeration for representing the measurement systems.
static class LocaleData.PaperSize
          A class that represents the size of letter head used in the country
 
Field Summary
static int ALT_QUOTATION_END
          Delimiter type for getDelimiter(int).
static int ALT_QUOTATION_START
          Delimiter type for getDelimiter(int).
static int DELIMITER_COUNT
          Count of delimiter types for getDelimiter(int).
static int ES_AUXILIARY
          EXType for getExemplarSet(int, int).
static int ES_COUNT
          Count of EXTypes for getExemplarSet(int, int).
static int ES_CURRENCY
          EXType for getExemplarSet(int, int).
static int ES_INDEX
          EXType for getExemplarSet(int, int).
static int ES_STANDARD
          EXType for getExemplarSet(int, int).
static int QUOTATION_END
          Delimiter type for getDelimiter(int).
static int QUOTATION_START
          Delimiter type for getDelimiter(int).
 
Method Summary
static VersionInfo getCLDRVersion()
          Returns the current CLDR version
 String getDelimiter(int type)
          Retrieves a delimiter string from the locale data.
 UnicodeSet getExemplarSet(int options, int extype)
          Returns the set of exemplar characters for a locale.
static UnicodeSet getExemplarSet(ULocale locale, int options)
          Returns the set of exemplar characters for a locale.
static UnicodeSet getExemplarSet(ULocale locale, int options, int extype)
          Returns the set of exemplar characters for a locale.
static LocaleData getInstance()
          Gets the LocaleData object associated with the default locale
static LocaleData getInstance(ULocale locale)
          Gets the LocaleData object associated with the ULocale specified in locale
 String getLocaleDisplayPattern()
          Returns LocaleDisplayPattern for this locale, e.g., {0}({1})
 String getLocaleSeparator()
          Returns LocaleDisplaySeparator for this locale.
static LocaleData.MeasurementSystem getMeasurementSystem(ULocale locale)
          Returns the measurement system used in the locale specified by the locale.
 boolean getNoSubstitute()
          Gets the "no substitute" behavior of this locale data object.
static LocaleData.PaperSize getPaperSize(ULocale locale)
          Returns the size of paper used in the locale.
 void setNoSubstitute(boolean setting)
          Sets the "no substitute" behavior of this locale data object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ES_STANDARD

public static final int ES_STANDARD
EXType for getExemplarSet(int, int).

See Also:
Constant Field Values
Status:
Stable ICU 3.4.

ES_AUXILIARY

public static final int ES_AUXILIARY
EXType for getExemplarSet(int, int).

See Also:
Constant Field Values
Status:
Stable ICU 3.4.

ES_INDEX

public static final int ES_INDEX
EXType for getExemplarSet(int, int).

See Also:
Constant Field Values
Status:
Stable ICU 3.4.

ES_CURRENCY

public static final int ES_CURRENCY
EXType for getExemplarSet(int, int).

See Also:
Constant Field Values
Status:
Stable ICU 3.4.

ES_COUNT

public static final int ES_COUNT
Count of EXTypes for getExemplarSet(int, int).

See Also:
Constant Field Values
Status:
Stable ICU 3.4.

QUOTATION_START

public static final int QUOTATION_START
Delimiter type for getDelimiter(int).

See Also:
Constant Field Values
Status:
Stable ICU 3.4.

QUOTATION_END

public static final int QUOTATION_END
Delimiter type for getDelimiter(int).

See Also:
Constant Field Values
Status:
Stable ICU 3.4.

ALT_QUOTATION_START

public static final int ALT_QUOTATION_START
Delimiter type for getDelimiter(int).

See Also:
Constant Field Values
Status:
Stable ICU 3.4.

ALT_QUOTATION_END

public static final int ALT_QUOTATION_END
Delimiter type for getDelimiter(int).

See Also:
Constant Field Values
Status:
Stable ICU 3.4.

DELIMITER_COUNT

public static final int DELIMITER_COUNT
Count of delimiter types for getDelimiter(int).

See Also:
Constant Field Values
Status:
Stable ICU 3.4.
Method Detail

getExemplarSet

public static UnicodeSet getExemplarSet(ULocale locale,
                                        int options)
Returns the set of exemplar characters for a locale.

Parameters:
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'.
Returns:
The set of exemplar characters for the given locale.
Status:
Stable ICU 3.0.

getExemplarSet

public static UnicodeSet getExemplarSet(ULocale locale,
                                        int options,
                                        int extype)
Returns the set of exemplar characters for a locale.

Parameters:
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'.
extype - The type of exemplar character set to retrieve.
Returns:
The set of exemplar characters for the given locale.
Status:
Stable ICU 3.0.

getExemplarSet

public UnicodeSet getExemplarSet(int options,
                                 int extype)
Returns the set of exemplar characters for a locale.

Parameters:
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, ES_INDEX, ES_CURRENCY, or ES_AUXILIARY
Returns:
The set of exemplar characters for the given locale.
Status:
Stable ICU 3.4.

getInstance

public static final LocaleData getInstance(ULocale locale)
Gets the LocaleData object associated with the ULocale specified in locale

Parameters:
locale - Locale with thich the locale data object is associated.
Returns:
A locale data object.
Status:
Stable ICU 3.4.

getInstance

public static final LocaleData getInstance()
Gets the LocaleData object associated with the default locale

Returns:
A locale data object.
Status:
Stable ICU 3.4.

setNoSubstitute

public void setNoSubstitute(boolean setting)
Sets the "no substitute" behavior of this locale data object.

Parameters:
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.
Status:
Stable ICU 3.4.

getNoSubstitute

public boolean getNoSubstitute()
Gets the "no substitute" behavior of this locale data object.

Returns:
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.
Status:
Stable ICU 3.4.

getDelimiter

public String getDelimiter(int type)
Retrieves a delimiter string from the locale data.

Parameters:
type - The type of delimiter string desired. Currently, the valid choices are QUOTATION_START, QUOTATION_END, ALT_QUOTATION_START, or ALT_QUOTATION_END.
Returns:
The desired delimiter string.
Status:
Stable ICU 3.4.

getMeasurementSystem

public static final LocaleData.MeasurementSystem getMeasurementSystem(ULocale locale)
Returns the measurement system used in the locale specified by the locale.

Parameters:
locale - The locale for which the measurement system to be retrieved.
Returns:
MeasurementSystem the measurement system used in the locale.
Status:
Stable ICU 3.0.

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.

Parameters:
locale - The locale for which the measurement system to be retrieved.
Returns:
The paper size used in the locale
Status:
Stable ICU 3.0.

getLocaleDisplayPattern

public String getLocaleDisplayPattern()
Returns LocaleDisplayPattern for this locale, e.g., {0}({1})

Returns:
locale display pattern as a String.
Status:
Stable ICU 4.2.

getLocaleSeparator

public String getLocaleSeparator()
Returns LocaleDisplaySeparator for this locale.

Returns:
locale display separator as a char.
Status:
Stable ICU 4.2.

getCLDRVersion

public static VersionInfo getCLDRVersion()
Returns the current CLDR version

Status:
Stable ICU 4.2.


Copyright (c) 2010 IBM Corporation and others.