Package ca.phon.util
Class Language
java.lang.Object
ca.phon.util.Language
- All Implemented Interfaces:
Comparable<Language>
Represents a language.
A language description comes in two parts: a 3-letter country code
and a list of user ids for the language. The syntax for the
language descriptor is: ([a-z]{3})(-[a-zA-Z0-9]{1,8})*
-
Constructor Summary
ConstructorDescriptionLanguage()
Language
(LanguageEntry primaryLanguage) Language
(LanguageEntry primaryLanguage, String[] userIDs) -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendUserID
(String userID) int
boolean
String[]
static Language
parseLanguage
(String lang) Create a new language from the given stringvoid
setPrimaryLanguage
(LanguageEntry primaryLanguage) void
setUserIDs
(String[] userIDs) toString()
-
Constructor Details
-
Language
public Language() -
Language
-
Language
-
-
Method Details
-
parseLanguage
Create a new language from the given string- Parameters:
lang
-- Returns:
- Throws:
IllegalArgumentException
-
getPrimaryLanguage
-
setPrimaryLanguage
-
getUserIDs
-
setUserIDs
-
appendUserID
-
toString
-
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Language>
-