Modifier and Type | Method and Description |
---|---|
static Locale |
fromRFC1766(String str)
Returns a
Locale representation of a string based locale that is in
the form of RFC 1766 (i.e. |
static boolean |
isIso(Locale locale)
|
static boolean |
isIsoCountry(Locale locale)
|
static boolean |
isIsoLanguage(Locale locale)
|
static Locale[] |
parse(Collection<String> strings)
Returns an array of
Locale objects that represent the string based
locale elements in strings that have the form
"{language}_{country}_{variant}" . |
static Locale[] |
parse(Enumeration<String> enumeration)
Returns an array of
Locale objects that represent the string based
locale elements in enumeration that have the form
"{language}_{country}_{variant}" . |
static Locale |
parse(String string)
Returns a
Locale representation of a string based locale that has
the form "{language}_{country}_{variant}" , or null if the
specified string is null. |
public static boolean isIso(Locale locale)
public static boolean isIsoCountry(Locale locale)
public static boolean isIsoLanguage(Locale locale)
public static Locale fromRFC1766(String str)
Locale
representation of a string based locale that is in
the form of RFC 1766 (i.e. "{language}-{country}"
), or null
if the specified string is null. Examples: "en"
, "fr-CH"
,
"i-cherokee"
.str
- The string.Locale
representation of a string based locale that has
the form "{language}_{country}_{variant}"
, or null
if the specified string is null.public static Locale parse(String string)
Locale
representation of a string based locale that has
the form "{language}_{country}_{variant}"
, or null
if the
specified string is null. Examples: "en"
, "de_DE"
,
"_GB"
, "en_US_WIN"
, "de__POSIX"
, "fr_MAC"
.string
- The string.Locale
representation of a string based locale that has
the form "{language}_{country}_{variant}"
, or null
if the specified string is null.public static Locale[] parse(Collection<String> strings)
Locale
objects that represent the string based
locale elements in strings
that have the form
"{language}_{country}_{variant}"
. Examples: "en"
,
"de_DE"
, "_GB"
, "en_US_WIN"
, "de__POSIX"
,
"fr_MAC"
.strings
- The Collection
of strings.Locale
objects that represent the string based
locale elements in strings
that have the form
"{language}_{country}_{variant}"
.NullPointerException
- If strings
is null.public static Locale[] parse(Enumeration<String> enumeration)
Locale
objects that represent the string based
locale elements in enumeration
that have the form
"{language}_{country}_{variant}"
. Examples: "en"
,
"de_DE"
, "_GB"
, "en_US_WIN"
, "de__POSIX"
,
"fr_MAC"
.enumeration
- The Enumeration
of strings.Locale
objects that represent the string based
locale elements in strings
that have the form
"{language}_{country}_{variant}"
.NullPointerException
- If enumeration
is null.Copyright © 2020 LibJ. All rights reserved.