Class Range

  • 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 class Range
    extends java.lang.Object
    Deprecated.
    This API is deprecated as Apache Abdera is a retired project since 2017.
    A language range used for matching language tags
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Range​(java.lang.String range)
      Deprecated.
      Create a Language-Range
      Range​(java.lang.String range, boolean extended)
      Deprecated.
      Create a Language-Range
      Range​(Lang lang)
      Deprecated.
      Create a Language-Range from a Lang tag
      Range​(Lang lang, boolean extended)
      Deprecated.
      Create a Language-Range from a Lang tag
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      Range append​(Subtag subtag)
      Deprecated.
      Append a subtag to the range
      Range appendWildcard()
      Deprecated.
      Append a wildcard subtag to the range
      java.util.List<Subtag> asList()
      Deprecated.
       
      Range clone()
      Deprecated.
      Copy this range
      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.
       
      java.lang.String[] filter​(java.lang.String... lang)
      Deprecated.
      Filter the given set of lang tags.
      static java.lang.String[] filter​(java.lang.String range, java.lang.String... lang)
      Deprecated.
      Filter the given set of lang tags.
      static Lang[] filter​(java.lang.String range, Lang... lang)
      Deprecated.
      Filter the given set of lang tags.
      Lang[] filter​(Lang... lang)
      Deprecated.
      Filter the given set of lang tags.
      Subtag get​(int index)
      Deprecated.
       
      int hashCode()
      Deprecated.
       
      boolean isBasic()
      Deprecated.
      True if this range is a basic range
      boolean isValid()
      Deprecated.
       
      java.util.Iterator<Subtag> iterator()
      Deprecated.
       
      int length()
      Deprecated.
       
      boolean matches​(java.lang.String lang)
      Deprecated.
      True if the lang tag matches this range
      boolean matches​(java.lang.String lang, boolean extended)
      Deprecated.
      True if the lang tag matches this range
      static boolean matches​(java.lang.String range, java.lang.String lang)
      Deprecated.
      True if the lang tag matches the range.
      static boolean matches​(java.lang.String range, java.lang.String lang, boolean extended)
      Deprecated.
      True if the lang tag matches the range.
      static boolean matches​(java.lang.String range, Lang lang)
      Deprecated.
      True if the lang tag matches the range.
      static boolean matches​(java.lang.String range, Lang lang, boolean extended)
      Deprecated.
      True if the lang tag matches the range.
      boolean matches​(Lang lang)
      Deprecated.
      True if the lang tag matches this range
      boolean matches​(Lang lang, boolean extended)
      Deprecated.
      True if the lang tag matches this range
      static Range parse​(java.lang.String range)
      Deprecated.
      Parse the language-range
      static Range parse​(java.lang.String range, boolean extended)
      Deprecated.
      Parse the language-range
      Subtag[] toArray()
      Deprecated.
       
      Range toBasicRange()
      Deprecated.
      Create a basic language-range from this range
      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

      • Range

        public Range​(java.lang.String range,
                     boolean extended)
        Deprecated.
        Create a Language-Range
        Parameters:
        range - The language-range
        extended - true if this is an extended language range
      • Range

        public Range​(java.lang.String range)
        Deprecated.
        Create a Language-Range
      • Range

        public Range​(Lang lang)
        Deprecated.
        Create a Language-Range from a Lang tag
      • Range

        public Range​(Lang lang,
                     boolean extended)
        Deprecated.
        Create a Language-Range from a Lang tag
        Parameters:
        lang - The language tag
        extended - true if this is an extended language-range
    • Method Detail

      • append

        public Range append​(Subtag subtag)
        Deprecated.
        Append a subtag to the range
      • appendWildcard

        public Range appendWildcard()
        Deprecated.
        Append a wildcard subtag to the range
      • clone

        public Range clone()
        Deprecated.
        Copy this range
      • toBasicRange

        public Range toBasicRange()
        Deprecated.
        Create a basic language-range from this range
      • isBasic

        public boolean isBasic()
        Deprecated.
        True if this range is a basic range
      • matches

        public boolean matches​(java.lang.String lang)
        Deprecated.
        True if the lang tag matches this range
      • matches

        public boolean matches​(java.lang.String lang,
                               boolean extended)
        Deprecated.
        True if the lang tag matches this range
        Parameters:
        lang - The language tage
        extended - True if extended matching rules should be used
      • matches

        public boolean matches​(Lang lang)
        Deprecated.
        True if the lang tag matches this range
      • matches

        public boolean matches​(Lang lang,
                               boolean extended)
        Deprecated.
        True if the lang tag matches this range
        Parameters:
        lang - The language tage
        extended - True if extended matching rules should be used
      • filter

        public Lang[] filter​(Lang... lang)
        Deprecated.
        Filter the given set of lang tags. Return an array of matching tags
      • filter

        public java.lang.String[] filter​(java.lang.String... lang)
        Deprecated.
        Filter the given set of lang tags. Return an array of matching tags
      • filter

        public static Lang[] filter​(java.lang.String range,
                                    Lang... lang)
        Deprecated.
        Filter the given set of lang tags. Return an array of matching tags
      • filter

        public static java.lang.String[] filter​(java.lang.String range,
                                                java.lang.String... lang)
        Deprecated.
        Filter the given set of lang tags. Return an array of matching tags
      • matches

        public static boolean matches​(java.lang.String range,
                                      Lang lang,
                                      boolean extended)
        Deprecated.
        True if the lang tag matches the range.
        Parameters:
        range - The language-range
        lang - The language tag
        extended - true to use extended match rules
      • matches

        public static boolean matches​(java.lang.String range,
                                      Lang lang)
        Deprecated.
        True if the lang tag matches the range.
        Parameters:
        range - The language-range
        lang - The language tag
        extended - true to use extended match rules
      • matches

        public static boolean matches​(java.lang.String range,
                                      java.lang.String lang,
                                      boolean extended)
        Deprecated.
        True if the lang tag matches the range.
        Parameters:
        range - The language-range
        lang - The language tag
        extended - true to use extended match rules
      • matches

        public static boolean matches​(java.lang.String range,
                                      java.lang.String lang)
        Deprecated.
        True if the lang tag matches the range.
        Parameters:
        range - The language-range
        lang - The language tag
        extended - true to use extended match rules
      • parse

        public static Range parse​(java.lang.String range)
        Deprecated.
        Parse the language-range
      • parse

        public static Range parse​(java.lang.String range,
                                  boolean extended)
        Deprecated.
        Parse the language-range
        Parameters:
        range - The language-range
        extended - true to use extended language rules
      • 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>