public class Language extends Object implements ILanguage
ILanguage
interface. This class should
not be instanciated by yourself. Use the static methods to find registered
instances - either by language code or name.Modifier and Type | Field and Description |
---|---|
protected String |
code |
static ILanguage |
ENGLISH
The English language.
|
static ILanguage |
GERMAN
The German language.
|
protected String |
iso639_1 |
protected String |
iso639_2b |
protected String |
iso639_2t |
protected String |
iso639_3 |
protected String |
name |
static ILanguage |
RUSSIAN
The Russian language.
|
Modifier | Constructor and Description |
---|---|
protected |
Language(String code,
String name,
String iso639_3,
String iso639_2b,
String iso639_2t,
String iso639_1) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ILanguage other) |
static boolean |
equals(ILanguage language1,
ILanguage language2)
Tests if the specified languages are equal.
|
boolean |
equals(Object other) |
static ILanguage |
findByCode(String code)
Find the language with the given code.
|
static ILanguage |
findByName(String name)
Find the language with the given name.
|
static ILanguage |
get(String code)
Returns the language with the given internal code.
|
String |
getCode()
Returns the internal language code used by JWTKL.
|
String |
getISO639_1()
Returns the ISO 639-1 code or an empty string if none.
|
String |
getISO639_2B()
Returns the ISO 639-2b code or an empty string if none.
|
String |
getISO639_2T()
Returns the ISO 639-2t code or an empty string if none.
|
String |
getISO639_3()
Returns the ISO 639-3 code or an empty string if none.
|
String |
getName()
Returns the language name (in English language).
|
int |
hashCode() |
String |
toString() |
protected String code
protected String name
protected String iso639_3
protected String iso639_2b
protected String iso639_2t
protected String iso639_1
public static final ILanguage ENGLISH
public static final ILanguage GERMAN
public static final ILanguage RUSSIAN
public String getCode()
ILanguage
public String getName()
ILanguage
public String getISO639_3()
ILanguage
getISO639_3
in interface ILanguage
public String getISO639_2B()
ILanguage
getISO639_2B
in interface ILanguage
public String getISO639_2T()
ILanguage
getISO639_2T
in interface ILanguage
public String getISO639_1()
ILanguage
getISO639_1
in interface ILanguage
public int compareTo(ILanguage other)
compareTo
in interface Comparable<ILanguage>
public static ILanguage get(String code)
findByCode(String)
if you are
unsure about your code. If no language could be found,
null
is returned.public static ILanguage findByCode(String code)
null
is returned.public static ILanguage findByName(String name)
null
is returned.Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.