public final class Lang extends Object
Constructor and Description |
---|
Lang()
Create a Lang object using the default locale
|
Lang(Locale locale)
Create a Lang object using the specified locale
|
Lang(String lang)
Create a lang object
|
Modifier and Type | Method and Description |
---|---|
List<Subtag> |
asList() |
Range |
asRange()
Get this Lang as a Language-Range for use with matching
|
Lang |
canonicalize()
Produce a canonicalized copy of this lang tag
|
Lang |
clone()
Clone this Language tag
|
int |
compareTo(org.apache.abdera.i18n.rfc4646.SubtagSet o) |
boolean |
contains(String tag) |
boolean |
contains(String tag,
Subtag.Type type) |
boolean |
contains(Subtag subtag) |
int |
count() |
boolean |
equals(Object obj) |
static String |
fromLocale(Locale locale) |
Subtag |
get(int index) |
Subtag |
getExtension()
Get the beginning of the extension section.
|
Subtag |
getExtLang()
Get the Extlang tag.
|
Subtag |
getLanguage()
Get the Language subtag
|
Locale |
getLocale()
Get a Locale object derived from this language tag
|
Lang |
getParent()
Get a Lang tag that drops the last subtag
|
Subtag |
getPrivateUse()
Get the beginning of the private-use section.
|
Subtag |
getRegion()
Get the Region subtag
|
Subtag |
getScript()
Get the Script subtag
|
Subtag |
getVariant()
Get the Variant subtag
|
int |
hashCode() |
boolean |
isChildOf(Lang lang)
Return true if the specified lang tag is the parent of this one
|
boolean |
isDeprecated()
Return true if this lang tag contains any deprecated subtags
|
boolean |
isParentOf(Lang lang)
Return true if the specified lang tag is the child of this one
|
boolean |
isValid() |
Iterator<Subtag> |
iterator() |
int |
length() |
static Lang |
parse(String lang)
Parse a Lang tag
|
Subtag[] |
toArray() |
String |
toString() |
forEach, spliterator
public Lang()
public Lang(Locale locale)
public Lang(String lang)
public Subtag getLanguage()
public Locale getLocale()
public Subtag getExtLang()
public Subtag getScript()
public Subtag getRegion()
public Subtag getVariant()
public Subtag getExtension()
public Subtag getPrivateUse()
public Range asRange()
public Lang canonicalize()
public boolean isDeprecated()
public Lang getParent()
public boolean isChildOf(Lang lang)
public boolean isParentOf(Lang lang)
public boolean contains(Subtag subtag)
public boolean contains(String tag)
public boolean contains(String tag, Subtag.Type type)
public int length()
public boolean isValid()
public int count()
public Subtag get(int index)
public Subtag[] toArray()
public int compareTo(org.apache.abdera.i18n.rfc4646.SubtagSet o)
compareTo
in interface Comparable<org.apache.abdera.i18n.rfc4646.SubtagSet>
Copyright © 2010 - 2020 Adobe. All Rights Reserved