Class AcceptLanguage
java.lang.Object
org.exoplatform.services.rest.impl.header.Language
org.exoplatform.services.rest.impl.header.AcceptLanguage
- All Implemented Interfaces:
QualityValue
- Version:
- $Id: $
- Author:
- Andrey Parfonov
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AcceptLanguageDefault accepted language, it minds any language is acceptable.Fields inherited from interface org.exoplatform.services.rest.header.QualityValue
DEFAULT_QUALITY_VALUE, QVALUE -
Constructor Summary
ConstructorsConstructorDescriptionAcceptLanguage(Locale locale) Constructs new instance of accepted language with default quality value.AcceptLanguage(Locale locale, float qValue) Constructs new instance of accepted language with quality value. -
Method Summary
Modifier and TypeMethodDescriptionfloatstatic AcceptLanguageCreates a new instance of AcceptedLanguage by parsing the supplied string.Methods inherited from class org.exoplatform.services.rest.impl.header.Language
getLocale, getLocale, getPrimaryTag, getSubTag, isCompatible, toString
-
Field Details
-
DEFAULT
Default accepted language, it minds any language is acceptable.
-
-
Constructor Details
-
AcceptLanguage
Constructs new instance of accepted language with default quality value.- Parameters:
locale- the language
-
AcceptLanguage
Constructs new instance of accepted language with quality value.- Parameters:
locale- the languageqValue- quality value
-
-
Method Details
-
valueOf
Creates a new instance of AcceptedLanguage by parsing the supplied string.- Parameters:
header- accepted language string- Returns:
- AcceptedLanguage
-
getQvalue
public float getQvalue()- Specified by:
getQvaluein interfaceQualityValue- Returns:
- value of quality parameter
-