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 Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The media type quality factor ("q") parameter name.
    static final String
    The wildcard value "*" used by standard in several headers.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Gets quality factor parameter ("q") as a double value.

    Methods inherited from interface java.util.function.Predicate

    and, negate, or, test
  • Field Details

    • QUALITY_FACTOR_PARAMETER

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

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

    • qualityFactor

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