public class LanguageRange extends Object implements Comparable<LanguageRange>
Language ranges are comparable so that sorting an array and then matching a language tag against each member of the array in sequence will give the longest match. i.e. the longer ranges come first.
Constructor and Description |
---|
LanguageRange(String range)
Note range must be in lower case, this is not verified.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(LanguageRange o) |
boolean |
equals(Object o) |
boolean |
extendedFilterMatch(String langTag)
This implements the algoirthm of section 3.3.2 of RFC 4647
as modified with the observation about private use tags
in
this message.
|
int |
hashCode() |
public LanguageRange(String range)
range
- public int compareTo(LanguageRange o)
compareTo
in interface Comparable<LanguageRange>
public boolean extendedFilterMatch(String langTag)
langTag
- The RFC 5646 Language tag in lower caseCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.