Package limn.i18n
Enum Class NumberingSystem
- All Implemented Interfaces:
Serializable,Comparable<NumberingSystem>,Constable
The digits a formatted number is written in: one zero code point and its nine successors,
which is all a decimal numbering system is. Resolved from the UI
language by
I18n.numberingSystem() and applied at format time through
I18n.localizeDigits(java.lang.String); nothing at the shaping or drawing layer knows this type exists
(ADR 033).
DEVA is never chosen automatically — CLDR defaults Hindi to Latin digits — and is
reachable through I18n.setNumberingSystem(limn.i18n.NumberingSystem), which is why it is here and in the glyph
coverage test rather than in the locale table. Further systems are a constant and a table row
away, behind the same coverage test.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionchardigit(int value) The digitvalue(0–9) is written as in this system.static intdigitValue(int codepoint) The numeric value ofcodepointin any system this enum knows, or-1.static NumberingSystemCLDR's default system forlocale, over the languages whose script faces the toolkit vendors.static NumberingSystemReturns the enum constant of this class with the specified name.static NumberingSystem[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LATN
ASCII0–9: the default, and the system every parse normalizes to. -
ARAB
Arabic-Indic٠–٩(U+0660–0669): Arabic outside the Maghreb. -
ARABEXT
Extended Arabic-Indic۰–۹(U+06F0–06F9): Persian and Pashto. -
DEVA
Devanagari०–९(U+0966–096F): by explicit override only.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
digit
public char digit(int value) The digitvalue(0–9) is written as in this system. -
digitValue
public static int digitValue(int codepoint) The numeric value ofcodepointin any system this enum knows, or-1. Deliberately not restricted to one system: a parse that folded only the active system's digits would reject a pasted value the moment the locale changed under it. -
forLocale
-