Package com.helger.http.header.specific
Class AcceptLanguageList
java.lang.Object
com.helger.http.header.AbstractQValueList<String>
com.helger.http.header.specific.AcceptLanguageList
Represents a list of Accept-Language values as specified in the HTTP header
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddLanguage(String sLanguage, double dQuality) booleanexplicitlySupportsLanguage(String sLanguage) doublegetQualityOfLanguage(String sLanguage) Return the associated quality of the given language.getQValueOfLanguage(String sLanguage) Return the associated quality of the given language.booleansupportsLanguage(String sLanguage) Methods inherited from class com.helger.http.header.AbstractQValueList
equals, getAllQValues, getAllQValuesGreaterOrEqual, getAllQValuesGreaterThan, getAllQValuesLowerOrEqual, getAllQValuesLowerThan, getAsHttpHeaderValue, getAsHttpHeaderValue, hashCode, qvalueMap, toString
-
Constructor Details
-
AcceptLanguageList
public AcceptLanguageList()
-
-
Method Details
-
addLanguage
@Nonnull public AcceptLanguageList addLanguage(@Nonnull String sLanguage, @Nonnegative double dQuality) -
getQValueOfLanguage
Return the associated quality of the given language.- Parameters:
sLanguage- The language name to query. May not benull.- Returns:
- The associated
QValue. Nevernull.
-
getQualityOfLanguage
Return the associated quality of the given language.- Parameters:
sLanguage- The language name to query. May not benull.- Returns:
- 0 means not accepted, 1 means fully accepted.
-
supportsLanguage
-
explicitlySupportsLanguage
-
getAsHttpHeaderValue
- Specified by:
getAsHttpHeaderValuein classAbstractQValueList<String>- Returns:
- The string representation of this list e.g. for usage in HTTP headers.
-