Class AcceptCharsetList

java.lang.Object
com.helger.http.header.AbstractQValueList<String>
com.helger.http.header.specific.AcceptCharsetList

public class AcceptCharsetList extends AbstractQValueList<String>
Represents a list of Accept-Charset values as specified in the HTTP header
Author:
Philip Helger
  • 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

      @Nonnull public QValue getQValueOfCharset(@Nonnull String sCharset)
      Return the associated quality of the given charset.
      Parameters:
      sCharset - The charset name to query. May not be null.
      Returns:
      The associated QValue.
    • getQualityOfCharset

      public double getQualityOfCharset(@Nonnull String sCharset)
      Return the associated quality of the given charset.
      Parameters:
      sCharset - The charset name to query. May not be null.
      Returns:
      0 means not accepted, 1 means fully accepted.
    • supportsCharset

      public boolean supportsCharset(@Nonnull String sCharset)
    • explicitlySupportsCharset

      public boolean explicitlySupportsCharset(@Nonnull String sCharset)
    • getAsHttpHeaderValue

      @Nonnull public String getAsHttpHeaderValue()
      Specified by:
      getAsHttpHeaderValue in class AbstractQValueList<String>
      Returns:
      The string representation of this list e.g. for usage in HTTP headers.