public class ICUNumbererPE extends AbstractNumberer
cyrillicLower, cyrillicUpper, greekLower, greekUpper, hebrew, hiraganaA, hiraganaI, katakanaA, katakanaI, latinLower, latinUpper, LOWER_CASE, TITLE_CASE, UPPER_CASE, westernDigits
Constructor and Description |
---|
ICUNumbererPE() |
Modifier and Type | Method and Description |
---|---|
static String[] |
availableOrdinalNumberings(String loc)
Return the available ordinal numbering schemes available for a given locale
|
static String[] |
availableSpelloutNumberings(String loc)
Return the available spellout numbering schemes available for a given locale
|
protected void |
config(Locale locale,
String privateUseExtension,
Configuration config)
Configure an ICU numberer.
|
String |
dayName(int day,
int minWidth,
int maxWidth)
Return an appropriate day name, using ICU data
The approach is to try each of the forms available in descending order of 'size'
until we have the first that fits the width constraints.
|
Locale |
defaultedLocale()
Returns the locale that was used by default, rather than that requested.
|
static String |
getICUVersion()
Return the version of the ICU supported in this implementation
|
static String[] |
getLocales()
Return all the locales available for collation
|
static ICUNumbererPE |
getNumberer(Locale locale,
String privateUseExtension,
Configuration config)
Returns a suitable configured ICU numberer or a specialist subclass thereof.
|
static String[] |
getPreferences() |
String |
monthName(int month,
int minWidth,
int maxWidth)
Return an appropriate month name, using ICU data
The approach is to try each of the forms available in descending order of 'size'
until we have the first that fits the width constraints.
|
String |
ordinalSuffix(String ordinalParam,
long number)
Construct the ordinal suffix for a number, for example "st", "nd", "rd".
|
String |
postProcess(String result)
Post-process a spelled-out number.
|
String |
postProcessOrdinal(String result,
String ordinalParam)
Post-process an ordinal spelled-out number.
|
static String |
realLocale(String loc)
Return the real language to be used for a given locale
|
String |
toOrdinalWords(String ordinalParam,
long number,
int wordCase)
Show an ordinal number as English words in a requested case (for example, Twentyfirst)
|
String |
toWords(long number)
Show the number as words in title case.
|
String |
toWords(long number,
int wordCase)
Format a number as English words with specified case options
|
alphaDefault, format, format, getCalendarName, getCountry, getEraName, getOrdinalSuffixForDateTime, halfDayName, setCountry, toAlpha, toAlphaSequence, toJapanese, toRoman
public static ICUNumbererPE getNumberer(Locale locale, String privateUseExtension, Configuration config)
locale
- the locale to useprivateUseExtension
- the language code extension used to denote required numberingconfig
- the system Configurationprotected void config(Locale locale, String privateUseExtension, Configuration config)
locale
- the locale to useprivateUseExtension
- the language code extension used to denote required numberingconfig
- the system Configurationpublic Locale defaultedLocale()
defaultedLocale
in interface Numberer
defaultedLocale
in class AbstractNumberer
public static String[] getLocales()
public static String[] getPreferences()
public static String[] availableSpelloutNumberings(String loc)
loc
- the locale codepublic static String[] availableOrdinalNumberings(String loc)
loc
- the locale codepublic static String realLocale(String loc)
loc
- the locale codepublic static String getICUVersion()
public String ordinalSuffix(String ordinalParam, long number)
AbstractNumberer
ordinalSuffix
in class AbstractNumberer
ordinalParam
- the value of the ordinal attribute (used in non-English
language implementations)number
- the number being formattedpublic String toWords(long number)
AbstractNumberer
toWords
in class AbstractNumberer
number
- the number to be formattedpublic String toWords(long number, int wordCase)
AbstractNumberer
toWords
in class AbstractNumberer
number
- the number to be formattedwordCase
- the required case for example AbstractNumberer.UPPER_CASE
,
AbstractNumberer.LOWER_CASE
, AbstractNumberer.TITLE_CASE
public String toOrdinalWords(String ordinalParam, long number, int wordCase)
AbstractNumberer
toOrdinalWords
in class AbstractNumberer
ordinalParam
- the value of the "ordinal" attribute as supplied by the usernumber
- the number to be formattedwordCase
- the required case for example AbstractNumberer.UPPER_CASE
,
AbstractNumberer.LOWER_CASE
, AbstractNumberer.TITLE_CASE
public String postProcess(String result)
result
- The spelled-out number generated by ICUpublic String postProcessOrdinal(String result, String ordinalParam)
result
- The spelled-out ordinal generated by ICUordinalParam
- The ordinal parameter, if anypublic String monthName(int month, int minWidth, int maxWidth)
monthName
in interface Numberer
monthName
in class AbstractNumberer
month
- The month number (1=January, 12=December)minWidth
- The minimum number of charactersmaxWidth
- The maximum number of characterspublic String dayName(int day, int minWidth, int maxWidth)
dayName
in interface Numberer
dayName
in class AbstractNumberer
day
- The day of the week (1=Monday, 7=Sunday)minWidth
- The minimum number of charactersmaxWidth
- The maximum number of charactersCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.