Class AbstractQValueList<KEYTYPE>

java.lang.Object
com.helger.http.header.AbstractQValueList<KEYTYPE>
Type Parameters:
KEYTYPE - The key type for the map.
Direct Known Subclasses:
AcceptCharsetList, AcceptEncodingList, AcceptLanguageList, AcceptMimeTypeList

public abstract class AbstractQValueList<KEYTYPE> extends Object
Represents a base class for all QValue'd stuff
Author:
Philip Helger
  • Constructor Details

    • AbstractQValueList

      public AbstractQValueList()
  • Method Details

    • qvalueMap

      @Nonnull @ReturnsMutableCopy protected final com.helger.collection.commons.ICommonsOrderedMap<KEYTYPE,QValue> qvalueMap()
    • getAllQValues

      @Nonnull @ReturnsMutableCopy public final com.helger.collection.commons.ICommonsOrderedMap<KEYTYPE,QValue> getAllQValues()
    • getAllQValuesLowerThan

      @Nonnull @ReturnsMutableCopy public final com.helger.collection.commons.ICommonsOrderedMap<KEYTYPE,QValue> getAllQValuesLowerThan(double dQuality)
    • getAllQValuesLowerOrEqual

      @Nonnull @ReturnsMutableCopy public final com.helger.collection.commons.ICommonsOrderedMap<KEYTYPE,QValue> getAllQValuesLowerOrEqual(double dQuality)
    • getAllQValuesGreaterThan

      @Nonnull @ReturnsMutableCopy public final com.helger.collection.commons.ICommonsOrderedMap<KEYTYPE,QValue> getAllQValuesGreaterThan(double dQuality)
    • getAllQValuesGreaterOrEqual

      @Nonnull @ReturnsMutableCopy public final com.helger.collection.commons.ICommonsOrderedMap<KEYTYPE,QValue> getAllQValuesGreaterOrEqual(double dQuality)
    • getAsHttpHeaderValue

      @Nonnull public abstract String getAsHttpHeaderValue()
      Returns:
      The string representation of this list e.g. for usage in HTTP headers.
      Since:
      9.3.5
    • getAsHttpHeaderValue

      @Nonnull protected String getAsHttpHeaderValue(@Nonnull Function<KEYTYPE,String> aKeyTransformer)
      Abstract implementation that requires a converter from the KEYTYPE generic parameter to String.
      Parameters:
      aKeyTransformer - The transformer from KEYTYPE to String. May not be null.
      Returns:
      The string representation of this list e.g. for usage in HTTP headers.
      Since:
      9.3.5
    • getAsHttpHeaderValue

      @Nonnull public static <T> String getAsHttpHeaderValue(@Nonnull com.helger.collection.commons.ICommonsOrderedMap<T,QValue> aMap, @Nonnull Function<T,String> aKeyTransformer)
      Static implementation of converting a map to String.
      Type Parameters:
      T - Key type
      Parameters:
      aMap - The map to be converted. May not be null.
      aKeyTransformer - The transformer from T to String. May not be null.
      Returns:
      The string representation of this list e.g. for usage in HTTP headers.
      Since:
      9.3.5
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object