CsrfPreventionFilter.MimePredicate (Apache Tomcat 9.0.120 API Documentation)
Description: declaration: package: org.apache.catalina.filters, class: CsrfPreventionFilter, class: MimePredicate

# Class CsrfPreventionFilter.MimePredicate

java.lang.Object
org.apache.catalina.filters.CsrfPreventionFilter.MimePredicate

All Implemented Interfaces:
  `Predicate<String>`

Enclosing class:
  `CsrfPreventionFilter`

protected static class CsrfPreventionFilter.MimePredicate extends Object implements Predicate<String>
A no-nonce Predicate that evaluates a MIME type instead of a URL. It can be used with any other Predicate for matching the actual value of the MIME type.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MimePredicate(ServletContext context, Predicate<String> predicate)`
  Construct a new MimePredicate.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Predicate<String>`
  `getPredicate()`
  Get the delegate predicate.
  `boolean`
  `test(String t)`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface Predicate

  `and, negate, or`

- ## Constructor Details

  - ### MimePredicate

    public MimePredicate(ServletContext context, Predicate<String> predicate)
    Construct a new MimePredicate.
    Parameters:
      `context` - The servlet context
      `predicate` - The delegate predicate for matching MIME types

- ## Method Details

  - ### test

    public boolean test(String t)
    Specified by:
      `test` in interface `Predicate<String>`

  - ### getPredicate

    public Predicate<String> getPredicate()
    Get the delegate predicate.
    Returns:
      The delegate predicate