public final class Lang
extends java.lang.Object
Constructor and Description |
---|
Lang()
Create a Lang object using the default locale
|
Lang(java.util.Locale locale)
Create a Lang object using the specified locale
|
Lang(java.lang.String lang)
Create a lang object
|
Modifier and Type | Method and Description |
---|---|
java.util.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(java.lang.String tag) |
boolean |
contains(java.lang.String tag,
Subtag.Type type) |
boolean |
contains(Subtag subtag) |
int |
count() |
boolean |
equals(java.lang.Object obj) |
static java.lang.String |
fromLocale(java.util.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
|
java.util.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() |
java.util.Iterator<Subtag> |
iterator() |
int |
length() |
static Lang |
parse(java.lang.String lang)
Parse a Lang tag
|
Subtag[] |
toArray() |
java.lang.String |
toString() |
public Lang()
public Lang(java.util.Locale locale)
public Lang(java.lang.String lang)
public Subtag getLanguage()
public java.util.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 clone()
clone
in class java.lang.Object
public Lang canonicalize()
public boolean isDeprecated()
public Lang getParent()
public boolean isChildOf(Lang lang)
public boolean isParentOf(Lang lang)
public static Lang parse(java.lang.String lang)
public static java.lang.String fromLocale(java.util.Locale locale)
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Iterator<Subtag> iterator()
iterator
in interface java.lang.Iterable<Subtag>
public boolean contains(Subtag subtag)
public boolean contains(java.lang.String tag)
public boolean contains(java.lang.String tag, Subtag.Type type)
public int length()
public boolean isValid()
public int count()
public Subtag get(int index)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public Subtag[] toArray()
public java.util.List<Subtag> asList()
public int compareTo(org.apache.abdera.i18n.rfc4646.SubtagSet o)
compareTo
in interface java.lang.Comparable<org.apache.abdera.i18n.rfc4646.SubtagSet>
Copyright © 2010 - 2020 Adobe. All Rights Reserved