Interface AcceptPredicate<T>

  • Type Parameters:
    T - The type of the Accept-* header value.
    All Superinterfaces:
    Predicate<T>
    All Known Implementing Classes:
    MediaType

    public interface AcceptPredicate<T>
    extends Predicate<T>
    API to model HTTP content negotiation using Accept-* request headers. (RFC 7231 and RFC 2295)

    It extends Predicate for smooth integration with standard functional APIs.

    • Field Detail

      • QUALITY_FACTOR_PARAMETER

        static final String QUALITY_FACTOR_PARAMETER
        The media type quality factor ("q") parameter name.
        See Also:
        Constant Field Values
      • WILDCARD_VALUE

        static final String WILDCARD_VALUE
        The wildcard value "*" used by standard in several headers.
        See Also:
        Constant Field Values
    • Method Detail

      • qualityFactor

        double qualityFactor()
        Gets quality factor parameter ("q") as a double value. If missing, then returns 1.0
        Returns:
        Quality factor parameter.