Package com.helger.http.header.specific
Class AcceptCharsetList
Represents a list of Accept-Charset values as specified in the HTTP header
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCharset(String sCharset, double dQuality) addCharset(Charset aCharset, double dQuality) booleanexplicitlySupportsCharset(String sCharset) doublegetQualityOfCharset(String sCharset) Return the associated quality of the given charset.getQValueOfCharset(String sCharset) Return the associated quality of the given charset.booleansupportsCharset(String sCharset) Methods inherited from class com.helger.http.header.AbstractQValueList
equals, getAllQValues, getAllQValuesGreaterOrEqual, getAllQValuesGreaterThan, getAllQValuesLowerOrEqual, getAllQValuesLowerThan, getAsHttpHeaderValue, getAsHttpHeaderValue, hashCode, qvalueMap, toString
-
Constructor Details
-
AcceptCharsetList
public AcceptCharsetList()
-
-
Method Details
-
addCharset
@Nonnull public AcceptCharsetList addCharset(@Nonnull Charset aCharset, @Nonnegative double dQuality) -
addCharset
@Nonnull public AcceptCharsetList addCharset(@Nonnull @Nonempty String sCharset, @Nonnegative double dQuality) -
getQValueOfCharset
Return the associated quality of the given charset.- Parameters:
sCharset- The charset name to query. May not benull.- Returns:
- The associated
QValue.
-
getQualityOfCharset
Return the associated quality of the given charset.- Parameters:
sCharset- The charset name to query. May not benull.- Returns:
- 0 means not accepted, 1 means fully accepted.
-
supportsCharset
-
explicitlySupportsCharset
-
getAsHttpHeaderValue
- Specified by:
getAsHttpHeaderValuein classAbstractQValueList<String>- Returns:
- The string representation of this list e.g. for usage in HTTP headers.
-