Class Lang

java.lang.Object
org.apache.abdera.i18n.rfc4646.Lang
All Implemented Interfaces:
Serializable, Cloneable, Comparable<org.apache.abdera.i18n.rfc4646.SubtagSet>, Iterable<Subtag>

@Deprecated(since="2021-07-29") public final class Lang extends Object
Deprecated.
This API is deprecated as Apache Abdera is a retired project since 2017.
Implementation of RFC 4646 Language Tags
See Also:
  • Constructor Details

    • Lang

      public Lang()
      Deprecated.
      Create a Lang object using the default locale
    • Lang

      public Lang(Locale locale)
      Deprecated.
      Create a Lang object using the specified locale
    • Lang

      public Lang(String lang)
      Deprecated.
      Create a lang object
  • Method Details

    • getLanguage

      public Subtag getLanguage()
      Deprecated.
      Get the Language subtag
    • getLocale

      public 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(String lang)
      Deprecated.
      Parse a Lang tag
    • fromLocale

      public static String fromLocale(Locale locale)
      Deprecated.
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object
    • iterator

      public Iterator<Subtag> iterator()
      Deprecated.
      Specified by:
      iterator in interface Iterable<Subtag>
    • contains

      public boolean contains(Subtag subtag)
      Deprecated.
    • contains

      public boolean contains(String tag)
      Deprecated.
    • contains

      public boolean contains(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 class Object
    • equals

      public boolean equals(Object obj)
      Deprecated.
      Overrides:
      equals in class Object
    • toArray

      public Subtag[] toArray()
      Deprecated.
    • asList

      public List<Subtag> asList()
      Deprecated.
    • compareTo

      public int compareTo(org.apache.abdera.i18n.rfc4646.SubtagSet o)
      Deprecated.
      Specified by:
      compareTo in interface Comparable<org.apache.abdera.i18n.rfc4646.SubtagSet>