Class 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
    • Constructor Summary

      Constructors 
      Constructor Description
      Lang()
      Deprecated.
      Create a Lang object using the default locale
      Lang​(java.lang.String lang)
      Deprecated.
      Create a lang object
      Lang​(java.util.Locale locale)
      Deprecated.
      Create a Lang object using the specified locale
    • 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 matching
      Lang canonicalize()
      Deprecated.
      Produce a canonicalized copy of this lang tag
      Lang clone()
      Deprecated.
      Clone this Language tag
      int 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 subtag
      java.util.Locale getLocale()
      Deprecated.
      Get a Locale object derived from this language tag
      Lang getParent()
      Deprecated.
      Get a Lang tag that drops the last subtag
      Subtag getPrivateUse()
      Deprecated.
      Get the beginning of the private-use section.
      Subtag getRegion()
      Deprecated.
      Get the Region subtag
      Subtag getScript()
      Deprecated.
      Get the Script subtag
      Subtag getVariant()
      Deprecated.
      Get the Variant subtag
      int hashCode()
      Deprecated.
       
      boolean isChildOf​(Lang lang)
      Deprecated.
      Return true if the specified lang tag is the parent of this one
      boolean isDeprecated()
      Deprecated.
      Return true if this lang tag contains any deprecated subtags
      boolean isParentOf​(Lang lang)
      Deprecated.
      Return true if the specified lang tag is the child of this one
      boolean isValid()
      Deprecated.
       
      java.util.Iterator<Subtag> iterator()
      Deprecated.
       
      int length()
      Deprecated.
       
      static Lang parse​(java.lang.String lang)
      Deprecated.
      Parse a Lang tag
      Subtag[] toArray()
      Deprecated.
       
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • Lang

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

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

        public Lang​(java.lang.String lang)
        Deprecated.
        Create a lang object
    • 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 class java.lang.Object
      • iterator

        public java.util.Iterator<Subtag> iterator()
        Deprecated.
        Specified by:
        iterator in interface java.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 class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Deprecated.
        Overrides:
        equals in class java.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 interface java.lang.Comparable<org.apache.abdera.i18n.rfc4646.SubtagSet>