Package org.apache.abdera.i18n.rfc4646
Class Lang
- java.lang.Object
-
- org.apache.abdera.i18n.rfc4646.Lang
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable<org.apache.abdera.i18n.rfc4646.SubtagSet>
,java.lang.Iterable<Subtag>
@Deprecated(since="2021-07-29") public final class Lang extends java.lang.Object
Deprecated.This API is deprecated as Apache Abdera is a retired project since 2017.Implementation of RFC 4646 Language Tags- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.List<Subtag>
asList()
Deprecated.Range
asRange()
Deprecated.Get this Lang as a Language-Range for use with matchingLang
canonicalize()
Deprecated.Produce a canonicalized copy of this lang tagLang
clone()
Deprecated.Clone this Language tagint
compareTo(org.apache.abdera.i18n.rfc4646.SubtagSet o)
Deprecated.boolean
contains(java.lang.String tag)
Deprecated.boolean
contains(java.lang.String tag, Subtag.Type type)
Deprecated.boolean
contains(Subtag subtag)
Deprecated.int
count()
Deprecated.boolean
equals(java.lang.Object obj)
Deprecated.static java.lang.String
fromLocale(java.util.Locale locale)
Deprecated.Subtag
get(int index)
Deprecated.Subtag
getExtension()
Deprecated.Get the beginning of the extension section.Subtag
getExtLang()
Deprecated.Get the Extlang tag.Subtag
getLanguage()
Deprecated.Get the Language subtagjava.util.Locale
getLocale()
Deprecated.Get a Locale object derived from this language tagLang
getParent()
Deprecated.Get a Lang tag that drops the last subtagSubtag
getPrivateUse()
Deprecated.Get the beginning of the private-use section.Subtag
getRegion()
Deprecated.Get the Region subtagSubtag
getScript()
Deprecated.Get the Script subtagSubtag
getVariant()
Deprecated.Get the Variant subtagint
hashCode()
Deprecated.boolean
isChildOf(Lang lang)
Deprecated.Return true if the specified lang tag is the parent of this oneboolean
isDeprecated()
Deprecated.Return true if this lang tag contains any deprecated subtagsboolean
isParentOf(Lang lang)
Deprecated.Return true if the specified lang tag is the child of this oneboolean
isValid()
Deprecated.java.util.Iterator<Subtag>
iterator()
Deprecated.int
length()
Deprecated.static Lang
parse(java.lang.String lang)
Deprecated.Parse a Lang tagSubtag[]
toArray()
Deprecated.java.lang.String
toString()
Deprecated.
-
-
-
Method Detail
-
getLanguage
public Subtag getLanguage()
Deprecated.Get the Language subtag
-
getLocale
public java.util.Locale getLocale()
Deprecated.Get a Locale object derived from this language tag
-
getExtLang
public Subtag getExtLang()
Deprecated.Get the Extlang tag. If there are multiple extlang tags, this will return the first one. The rest can be retrieved by following Subtag.getNext()
-
getScript
public Subtag getScript()
Deprecated.Get the Script subtag
-
getRegion
public Subtag getRegion()
Deprecated.Get the Region subtag
-
getVariant
public Subtag getVariant()
Deprecated.Get the Variant subtag
-
getExtension
public Subtag getExtension()
Deprecated.Get the beginning of the extension section. This will return the first prefix subtag of the first set of extension subtags.
-
getPrivateUse
public Subtag getPrivateUse()
Deprecated.Get the beginning of the private-use section. This will return the x prefix subtag
-
asRange
public Range asRange()
Deprecated.Get this Lang as a Language-Range for use with matching
-
clone
public Lang clone()
Deprecated.Clone this Language tag
-
canonicalize
public Lang canonicalize()
Deprecated.Produce a canonicalized copy of this lang tag
-
isDeprecated
public boolean isDeprecated()
Deprecated.Return true if this lang tag contains any deprecated subtags
-
getParent
public Lang getParent()
Deprecated.Get a Lang tag that drops the last subtag
-
isChildOf
public boolean isChildOf(Lang lang)
Deprecated.Return true if the specified lang tag is the parent of this one
-
isParentOf
public boolean isParentOf(Lang lang)
Deprecated.Return true if the specified lang tag is the child of this one
-
parse
public static Lang parse(java.lang.String lang)
Deprecated.Parse a Lang tag
-
fromLocale
public static java.lang.String fromLocale(java.util.Locale locale)
Deprecated.
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
iterator
public java.util.Iterator<Subtag> iterator()
Deprecated.- Specified by:
iterator
in interfacejava.lang.Iterable<Subtag>
-
contains
public boolean contains(Subtag subtag)
Deprecated.
-
contains
public boolean contains(java.lang.String tag)
Deprecated.
-
contains
public boolean contains(java.lang.String tag, Subtag.Type type)
Deprecated.
-
length
public int length()
Deprecated.
-
isValid
public boolean isValid()
Deprecated.
-
count
public int count()
Deprecated.
-
get
public Subtag get(int index)
Deprecated.
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Deprecated.- Overrides:
equals
in classjava.lang.Object
-
toArray
public Subtag[] toArray()
Deprecated.
-
asList
public java.util.List<Subtag> asList()
Deprecated.
-
compareTo
public int compareTo(org.apache.abdera.i18n.rfc4646.SubtagSet o)
Deprecated.- Specified by:
compareTo
in interfacejava.lang.Comparable<org.apache.abdera.i18n.rfc4646.SubtagSet>
-
-