Package org.apache.abdera.i18n.rfc4646
Class Range
- java.lang.Object
-
- org.apache.abdera.i18n.rfc4646.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-RangeRange(java.lang.String range, boolean extended)
Deprecated.Create a Language-RangeRange(Lang lang)
Deprecated.Create a Language-Range from a Lang tagRange(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 rangeRange
appendWildcard()
Deprecated.Append a wildcard subtag to the rangejava.util.List<Subtag>
asList()
Deprecated.Range
clone()
Deprecated.Copy this rangeint
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 rangeboolean
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 rangeboolean
matches(java.lang.String lang, boolean extended)
Deprecated.True if the lang tag matches this rangestatic 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 rangeboolean
matches(Lang lang, boolean extended)
Deprecated.True if the lang tag matches this rangestatic Range
parse(java.lang.String range)
Deprecated.Parse the language-rangestatic Range
parse(java.lang.String range, boolean extended)
Deprecated.Parse the language-rangeSubtag[]
toArray()
Deprecated.Range
toBasicRange()
Deprecated.Create a basic language-range from this rangejava.lang.String
toString()
Deprecated.
-
-
-
Constructor Detail
-
Range
public Range(java.lang.String range, boolean extended)
Deprecated.Create a Language-Range- Parameters:
range
- The language-rangeextended
- 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 tagextended
- true if this is an extended language-range
-
-
Method Detail
-
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 tageextended
- 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 tageextended
- 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-rangelang
- The language tagextended
- 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-rangelang
- The language tagextended
- 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-rangelang
- The language tagextended
- 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-rangelang
- The language tagextended
- 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-rangeextended
- true to use extended language rules
-
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>
-
-