Package com.luna.common.i18n
Enum Class ScriptCode
- All Implemented Interfaces:
Serializable
,Comparable<ScriptCode>
,java.lang.constant.Constable
- Since:
- 1.2
- Author:
- Takahiko Kawasaki
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAfaka [439]Caucasian Albanian [239]Arabic [160]Imperial Aramaic [124]Armenian [230]Avestan [134]Balinese [360]Bamum [435]Bassa Vah [259]Batak [365]Bengali [325]Blissymbols [550]Bopomofo [285]Brahmi [300]Braille [570]Buginese [367]Buhid [372]Chakma [349]Unified Canadian Aboriginal Syllabics [440]Carian [201]Cham [358]Cherokee [445]Cirth [291]Coptic [204]Cypriot [403]Cyrillic [220]Cyrillic [221]Devanagari [315]Deseret [250]Duployan shorthand, Duployan stenography [755]Egyptian demotic [070]Egyptian hieratic [060]Egyptian hieroglyphs [050]Elbasan [226]Ethiopic [430]Khutsuri [241]Georgian [240]Glagolitic [225]Gothic [206]Grantha [343]Greek [200]Gujarati [320]Gurmukhi [310]Hangul [286]Han [500]Hanunoo [371]Han [501]Han [502]Hebrew [125]Hiragana [410]Anatolian Hieroglyphs [080]Pahawh Hmong [450]Japanese syllabaries [412]Old Hungarian [176]Indus [610]Old Italic [210]Javanese [361]Japanese [413]Jurchen [510]Kayah Li [357]Katakana [411]Kharoshthi [305]Khmer [355]Khojki [322]Kannada [345]Korean [287]Kpelle [436]Kaithi [317]Tai Tham [351]Lao [356]Latin [217]Latin [216]Latin [215]Lepcha [335]Limbu [336]Linear A [400]Linear B [401]Lisu [399]Loma [437]Lycian [202]Lydian [116]Mahajani [314]Mandaic, Mandaean [140]Manichaean [139]Mayan hieroglyphs [090]Mende [438]Meroitic Cursive [101]Meroitic Hieroglyphs [100]Malayalam [347]Mongolian [145]Moon [218]Mro, Mru [199]Meitei Mayek [337]Myanmar [350]Old North Arabian [106]Nabataean [159]Nakhi Geba [420]N’Ko [165]Nushu [499]Ogham [212]Ol Chiki [261]Old Turkic, Orkhon Runic [175]Oriya [327]Osmanya [260]Palmyrene [126]Old Permic [227]Phags-pa [331]Inscriptional Pahlavi [131]Psalter Pahlavi [132]Book Pahlavi [133]Phoenician [115]Miao [282]Inscriptional Parthian [130]Reserved for private use [900]Reserved for private use [949]Rejang [363]Rongorongo [620]Runic [211]Samaritan [123]Sarati [292]Old South Arabian [105]Saurashtra [344]SignWriting [095]Shavian [281]Sharada [319]Khudawadi, Sindhi [318]Sinhala [348]Sora Sompeng [398]Sundanese [362]Syloti Nagri [316]Syriac [135]Syriac [138]Syriac [137]Syriac [136]Tagbanwa [373]Takri [321]Tai Le [353]New Tai Lue [354]Tamil [346]Tangut [520]Tai Viet [359]Telugu [340]Tengwar [290]Tifinagh [120]Tagalog [370]Thaana [170]Thai [352]Tibetan [330]Tirhuta [326]Ugaritic [040]Undefined [-1]Vai [470]Visible Speech [280]Warang Citi [262]Woleai [480]Old Persian [030]Cuneiform, Sumero-Akkadian [020]Yi [460]Code for inherited script [994]Mathematical notation [995]Symbols [996]Code for unwritten documents [997]Code for undetermined script [998]Code for uncoded script [999] -
Method Summary
Modifier and TypeMethodDescriptionstatic List<ScriptCode>
findByName
(String regex) Get a list ofScriptCode
by a name regular expression.static List<ScriptCode>
findByName
(Pattern pattern) Get a list ofScriptCode
by a name pattern.static ScriptCode
getByCode
(int code) Get aScriptCode
instance that corresponds to the given ISO 15924 numeric code.static ScriptCode
Get aScriptCode
instance that corresponds to the given ISO 15924 alpha-4 code.static ScriptCode
Get aScriptCode
instance that corresponds to the given ISO 15924 alpha-4 code.static ScriptCode
getByCodeIgnoreCase
(String code) Get aScriptCode
instance that corresponds to the given ISO 15924 alpha-4 code.getName()
Get English name of this script code.int
Get the numeric code of this script code.static ScriptCode
Returns the enum constant of this class with the specified name.static ScriptCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Undefined
Undefined [-1]This is not an official ISO 15924 code.
-
Afak
Afaka [439] -
Aghb
Caucasian Albanian [239] -
Arab
Arabic [160] -
Armi
Imperial Aramaic [124] -
Armn
Armenian [230] -
Avst
Avestan [134] -
Bali
Balinese [360] -
Bamu
Bamum [435] -
Bass
Bassa Vah [259] -
Batk
Batak [365] -
Beng
Bengali [325] -
Blis
Blissymbols [550] -
Bopo
Bopomofo [285] -
Brah
Brahmi [300] -
Brai
Braille [570] -
Bugi
Buginese [367] -
Buhd
Buhid [372] -
Cakm
Chakma [349] -
Cans
Unified Canadian Aboriginal Syllabics [440] -
Cari
Carian [201] -
Cham
Cham [358] -
Cher
Cherokee [445] -
Cirt
Cirth [291] -
Copt
Coptic [204] -
Cprt
Cypriot [403] -
Cyrl
Cyrillic [220] -
Cyrs
Cyrillic [221] -
Deva
Devanagari [315] -
Dsrt
Deseret [250] -
Dupl
Duployan shorthand, Duployan stenography [755] -
Egyd
Egyptian demotic [070] -
Egyh
Egyptian hieratic [060] -
Egyp
Egyptian hieroglyphs [050] -
Elba
Elbasan [226] -
Ethi
Ethiopic [430] -
Geor
Georgian [240] -
Geok
Khutsuri [241] -
Glag
Glagolitic [225] -
Goth
Gothic [206] -
Gran
Grantha [343] -
Grek
Greek [200] -
Gujr
Gujarati [320] -
Guru
Gurmukhi [310] -
Hang
Hangul [286] -
Hani
Han [500] -
Hano
Hanunoo [371] -
Hans
Han [501] -
Hant
Han [502] -
Hebr
Hebrew [125] -
Hira
Hiragana [410] -
Hluw
Anatolian Hieroglyphs [080] -
Hmng
Pahawh Hmong [450] -
Hrkt
Japanese syllabaries [412] -
Hung
Old Hungarian [176] -
Inds
Indus [610] -
Ital
Old Italic [210] -
Java
Javanese [361] -
Jpan
Japanese [413] -
Jurc
Jurchen [510] -
Kali
Kayah Li [357] -
Kana
Katakana [411] -
Khar
Kharoshthi [305] -
Khmr
Khmer [355] -
Khoj
Khojki [322] -
Knda
Kannada [345] -
Kore
Korean [287] -
Kpel
Kpelle [436] -
Kthi
Kaithi [317] -
Lana
Tai Tham [351] -
Laoo
Lao [356] -
Latf
Latin [217] -
Latg
Latin [216] -
Latn
Latin [215] -
Lepc
Lepcha [335] -
Limb
Limbu [336] -
Lina
Linear A [400] -
Linb
Linear B [401] -
Lisu
Lisu [399] -
Loma
Loma [437] -
Lyci
Lycian [202] -
Lydi
Lydian [116] -
Mahj
Mahajani [314] -
Mand
Mandaic, Mandaean [140] -
Mani
Manichaean [139] -
Maya
Mayan hieroglyphs [090] -
Mend
Mende [438] -
Merc
Meroitic Cursive [101] -
Mero
Meroitic Hieroglyphs [100] -
Mlym
Malayalam [347] -
Moon
Moon [218] -
Mong
Mongolian [145] -
Mroo
Mro, Mru [199] -
Mtei
Meitei Mayek [337] -
Mymr
Myanmar [350] -
Narb
Old North Arabian [106] -
Nbat
Nabataean [159] -
Nkgb
Nakhi Geba [420] -
Nkoo
N’Ko [165] -
Nshu
Nushu [499] -
Ogam
Ogham [212] -
Olck
Ol Chiki [261] -
Orkh
Old Turkic, Orkhon Runic [175] -
Orya
Oriya [327] -
Osma
Osmanya [260] -
Palm
Palmyrene [126] -
Perm
Old Permic [227] -
Phag
Phags-pa [331] -
Phli
Inscriptional Pahlavi [131] -
Phlp
Psalter Pahlavi [132] -
Phlv
Book Pahlavi [133] -
Phnx
Phoenician [115] -
Plrd
Miao [282] -
Prti
Inscriptional Parthian [130] -
Qaaa
Reserved for private use [900] -
Qabx
Reserved for private use [949] -
Rjng
Rejang [363] -
Roro
Rongorongo [620] -
Runr
Runic [211] -
Samr
Samaritan [123] -
Sara
Sarati [292] -
Sarb
Old South Arabian [105] -
Saur
Saurashtra [344] -
Sgnw
SignWriting [095] -
Shaw
Shavian [281] -
Shrd
Sharada [319] -
Sind
Khudawadi, Sindhi [318] -
Sinh
Sinhala [348] -
Sora
Sora Sompeng [398] -
Sund
Sundanese [362] -
Sylo
Syloti Nagri [316] -
Syrc
Syriac [135] -
Syre
Syriac [138] -
Syrj
Syriac [137] -
Syrn
Syriac [136] -
Tagb
Tagbanwa [373] -
Takr
Takri [321] -
Tale
Tai Le [353] -
Talu
New Tai Lue [354] -
Taml
Tamil [346] -
Tang
Tangut [520] -
Tavt
Tai Viet [359] -
Telu
Telugu [340] -
Teng
Tengwar [290] -
Tfng
Tifinagh [120] -
Tglg
Tagalog [370] -
Thaa
Thaana [170] -
Thai
Thai [352] -
Tibt
Tibetan [330] -
Tirh
Tirhuta [326] -
Ugar
Ugaritic [040] -
Vaii
Vai [470] -
Visp
Visible Speech [280] -
Wara
Warang Citi [262] -
Wole
Woleai [480] -
Xpeo
Old Persian [030] -
Xsux
Cuneiform, Sumero-Akkadian [020] -
Yiii
Yi [460] -
Zinh
Code for inherited script [994] -
Zmth
Mathematical notation [995] -
Zsym
Symbols [996] -
Zxxx
Code for unwritten documents [997] -
Zyyy
Code for undetermined script [998] -
Zzzz
Code for uncoded script [999]
-
-
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
-
getByCode
Get aScriptCode
instance that corresponds to the given ISO 15924 alpha-4 code.This method calls
getByCode
(code, true)
. Note that the behavior has changed since the version 1.13. In the older versions, this method was an alias ofgetByCode(code, false)
.- Parameters:
code
- ISO 15924 alpha-4 code. Or "Undefined" (case sensitive).- Returns:
- A
ScriptCode
instance, ornull
if not found.
-
getByCodeIgnoreCase
Get aScriptCode
instance that corresponds to the given ISO 15924 alpha-4 code.This method calls
getByCode
(code, false)
.- Parameters:
code
- ISO 15924 alpha-4 code. Or "Undefined" (case insensitive).- Returns:
- A
ScriptCode
instance, ornull
if not found. - Since:
- 1.13
-
getByCode
Get aScriptCode
instance that corresponds to the given ISO 15924 alpha-4 code.- Parameters:
code
- ISO 15924 alpha-4 code. Or "Undefined" (its case sensitivity depends on the value ofcaseSensitive
).caseSensitive
- Iftrue
, the first letter of the given code should be capital and the other letters should be small. Iffalse
, whether letters are capital or small does not matter. For example,getByCode("JPAN", true)
returnsnull
butgetByCode("JPAN", false)
returnsJpan
.- Returns:
- A
ScriptCode
instance, ornull
if not found.
-
getByCode
Get aScriptCode
instance that corresponds to the given ISO 15924 numeric code.- Parameters:
code
- ISO 15924 numeric code.- Returns:
- A
ScriptCode
instance, ornull
if not found. If 0 or a negative value is given,null
is returned.
-
findByName
Get a list ofScriptCode
by a name regular expression.This method is almost equivalent to
findByName
(Pattern.compile(regex))
.- Parameters:
regex
- Regular expression for names.- Returns:
- List of
ScriptCode
. If nothing has matched, an empty list is returned. - Throws:
IllegalArgumentException
-regex
isnull
.PatternSyntaxException
-regex
failed to be compiled.- Since:
- 1.11
-
findByName
Get a list ofScriptCode
by a name pattern.For example, the list obtained by the code snippet below:
Pattern pattern = Pattern.compile("Egyptian.*"); List<ScriptCode> list = ScriptCode.findByName(pattern);
contains 3
ScriptCode
s as listed below.- Parameters:
pattern
- Pattern to match names.- Returns:
- List of
ScriptCode
. If nothing has matched, an empty list is returned. - Throws:
IllegalArgumentException
-pattern
isnull
.- Since:
- 1.11
-
getNumeric
public int getNumeric()Get the numeric code of this script code.- Returns:
- Numeric code.
-
getName
Get English name of this script code.- Returns:
- English name.
-