public final class Language extends Metadata
Modifier and Type | Field and Description |
---|---|
static Language |
ALL
All languages acceptable.
|
static Language |
DEFAULT |
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 and Description |
---|
Language(java.lang.String name)
Constructor.
|
Language(java.lang.String name,
java.lang.String description)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object) |
Language |
getParent()
Returns the parent metadata if available or null.
|
java.lang.String |
getPrimaryTag()
Returns the primary tag.
|
java.util.List<java.lang.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(java.lang.String name)
Returns the language associated to a name.
|
getDescription, getName, isCompatible, toString
public static final Language ALL
public static final Language DEFAULT
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
public Language(java.lang.String name)
name
- The name.public Language(java.lang.String name, java.lang.String description)
name
- The name.description
- The description.public static Language valueOf(java.lang.String name)
name
- The name.public Language getParent()
Metadata
public java.lang.String getPrimaryTag()
public java.util.List<java.lang.String> getSubTags()
public boolean includes(Metadata included)
Examples:
includes
in class Metadata
included
- The language to test for inclusion.Metadata.isCompatible(Metadata)
Copyright © 2005-2024 Restlet.