Constructor and Description |
---|
LanguageRange(Locale locale) |
LanguageRange(String range) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Locale |
getPrimaryLanguageSubTag()
The primary language subtag if it is not equal to "*",
null otherwise. |
int |
getSpecificity()
To determine whether a language range is more specific than another language range.
|
int |
hashCode() |
static boolean |
matches(Collection<VoiceInfo.LanguageRange> languageList,
Locale locale)
Whether the language list matches the given locale.
|
boolean |
matches(Locale locale)
Whether the language range matches the given locale.
|
String |
toString() |
static String |
toString(Collection<VoiceInfo.LanguageRange> languageList)
Print language list as comma-separated list.
|
public LanguageRange(String range)
IllegalArgumentException
- if the argument does not represent a valid language rangepublic LanguageRange(Locale locale)
public boolean matches(Locale locale)
public static boolean matches(Collection<VoiceInfo.LanguageRange> languageList, Locale locale)
public Locale getPrimaryLanguageSubTag()
null
otherwise.public int getSpecificity()
public static String toString(Collection<VoiceInfo.LanguageRange> languageList)
Copyright © 2010–2024 The DAISY Consortium. All rights reserved.