Class LanguageParser
java.lang.Object
ca.phon.util.LanguageParser
- All Implemented Interfaces:
Iterable<LanguageEntry>
-
Method Summary
Modifier and TypeMethodDescriptionstatic LanguageEntryentryFromLine(String line) Parse the language entry from the given line in the ISO file.getEntriesByProperty(String prop, String value) FetchesLanguageEntryobjects that have a specified property and property value.getEntryById(String subtag) Get aLanguageEntryobject based on subtag.getEntryByLanguage(String language) Get aLanguageEntryobject based on language name.getEntryByProperty(String prop, String value) Fetches a singleLanguageEntryobject that has the specified property value.static LanguageParserGet a collection of languages.iterator()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
Collectionof languages known to the parser
-
getEntryById
Get aLanguageEntryobject based on subtag.- Parameters:
subtag- the subtag to check for- Returns:
- a
LanguageEntryobject
-
getEntryByLanguage
Get aLanguageEntryobject based on language name.- Parameters:
language- the language to check for- Returns:
- a
LanguageEntryobject
-
getEntriesByProperty
FetchesLanguageEntryobjects 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
CollectionofLanguageEntryobjects
-
getEntryByProperty
Fetches a singleLanguageEntryobject 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
LanguageEntryobject, or null if nothing found
-
iterator
- Specified by:
iteratorin interfaceIterable<LanguageEntry>
-
getInstance
-