Package ca.phon.util
Class LanguageParser
java.lang.Object
ca.phon.util.LanguageParser
- All Implemented Interfaces:
Iterable<LanguageEntry>
-
Method Summary
Modifier and TypeMethodDescriptionstatic LanguageEntry
entryFromLine
(String line) Parse the language entry from the given line in the ISO file.getEntriesByProperty
(String prop, String value) FetchesLanguageEntry
objects that have a specified property and property value.getEntryById
(String subtag) Get aLanguageEntry
object based on subtag.getEntryByLanguage
(String language) Get aLanguageEntry
object based on language name.getEntryByProperty
(String prop, String value) Fetches a singleLanguageEntry
object that has the specified property value.static LanguageParser
Get a collection of languages.iterator()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
entryFromLine
Parse the language entry from the given line in the ISO file. -
getLanguages
Get a collection of languages.- Returns:
- a
Collection
of languages known to the parser
-
getEntryById
Get aLanguageEntry
object based on subtag.- Parameters:
subtag
- the subtag to check for- Returns:
- a
LanguageEntry
object
-
getEntryByLanguage
Get aLanguageEntry
object based on language name.- Parameters:
language
- the language to check for- Returns:
- a
LanguageEntry
object
-
getEntriesByProperty
FetchesLanguageEntry
objects that have a specified property and property value.- Parameters:
prop
- the name of the property to check forvalue
- the value of the property to check for- Returns:
- a
Collection
ofLanguageEntry
objects
-
getEntryByProperty
Fetches a singleLanguageEntry
object that has the specified property value.- Parameters:
prop
- the name of the property to check forvalue
- the value of the property to check for- Returns:
- a
LanguageEntry
object, or null if nothing found
-
iterator
- Specified by:
iterator
in interfaceIterable<LanguageEntry>
-
getInstance
-