Interface MediaTypePredicate

All Superinterfaces:
Predicate<MediaTypeInfo>

public interface MediaTypePredicate extends Predicate<MediaTypeInfo>
  • Method Details

    • supportedTypes

      List<String> supportedTypes()
      This method is intended for reporting of supported media types in the system.
      Returns:
      The list of supported types.
    • ofExactTypes

      static MediaTypePredicate ofExactTypes(String... types)
      Factory for a predicate that accepts a list of types. Checks if the mediatype is equal to one of the types provided. Only checks the type/subtype+suffix. Ignores the attributes.
      Parameters:
      types - The types to accept
      Returns:
      The predicate that checks if the mediatype is part of the provided list.
    • ofRegexp

      static MediaTypePredicate ofRegexp(String regexp)
      Factory for a predicate that accepts types based on a regular expression. Only checks the type/subtype+suffix. Ignores the attributes.
      Parameters:
      regexp - The regular expression
      Returns:
      A predicate that checks if the mediatype matches the regular expression.