|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.data.Metadata
org.restlet.data.Language
public final class Language
Language used in representations and preferences. A language tag is composed of one or more parts: A primary language tag and a possibly empty series of sub-tags. When formatted as a string, parts are separated by hyphens.
| Field Summary | |
|---|---|
static Language |
ALL
All languages acceptable. |
static Language |
DEFAULT
The default language of the JVM. |
static Language |
ENGLISH
English language. |
static Language |
ENGLISH_US
English language spoken in USA. |
static Language |
FRENCH
French language. |
static Language |
FRENCH_FRANCE
French language spoken in France. |
static Language |
SPANISH
Spanish language. |
| Constructor Summary | |
|---|---|
Language(String name)
Constructor. |
|
Language(String name,
String description)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object object)
|
Language |
getParent()
Returns the parent metadata if available or null. |
String |
getPrimaryTag()
Returns the primary tag. |
List<String> |
getSubTags()
Returns the unmodifiable list of subtags. |
int |
hashCode()
|
boolean |
includes(Metadata included)
Indicates if a given language is included in the current one. |
static Language |
valueOf(String name)
Returns the language associated to a name. |
| Methods inherited from class org.restlet.data.Metadata |
|---|
getDescription, getName, isCompatible, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Language ALL
public static final Language DEFAULT
Locale.getDefault()public static final Language ENGLISH
public static final Language ENGLISH_US
public static final Language FRENCH
public static final Language FRENCH_FRANCE
public static final Language SPANISH
| Constructor Detail |
|---|
public Language(String name)
name - The name.
public Language(String name,
String description)
name - The name.description - The description.| Method Detail |
|---|
public static Language valueOf(String name)
name - The name.
public boolean equals(Object object)
equals in class Metadatapublic Language getParent()
Metadata
getParent in class Metadatapublic String getPrimaryTag()
public List<String> getSubTags()
public int hashCode()
hashCode in class Metadatapublic boolean includes(Metadata included)
Examples:
includes in class Metadataincluded - The language to test for inclusion.
Metadata.isCompatible(Metadata)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||