RewriteCond.PatternCondition (Apache Tomcat 9.0.119 API Documentation)
Description: declaration: package: org.apache.catalina.valves.rewrite, class: RewriteCond, class: PatternCondition

# Class RewriteCond.PatternCondition

java.lang.Object
org.apache.catalina.valves.rewrite.RewriteCond.Condition
org.apache.catalina.valves.rewrite.RewriteCond.PatternCondition

Enclosing class:
  `RewriteCond`

public static class RewriteCond.PatternCondition extends RewriteCond.Condition
Pattern-based condition.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `Pattern`
  `pattern`
  The compiled pattern for matching.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PatternCondition()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `evaluate(String value, Resolver resolver)`
  Evaluate the condition.
  `Matcher`
  `getMatcher()`
  Returns the last matcher used for evaluation.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### pattern

    public Pattern pattern
    The compiled pattern for matching.

- ## Constructor Details

  - ### PatternCondition

    public PatternCondition()
    Default constructor.

- ## Method Details

  - ### evaluate

    public boolean evaluate(String value, Resolver resolver)
    Description copied from class: `RewriteCond.Condition`
    Evaluate the condition.
    Specified by:
      `evaluate` in class `RewriteCond.Condition`
    Parameters:
      `value` - The value to evaluate
      `resolver` - The resolver
    Returns:
      `true` if the condition is met

  - ### getMatcher

    public Matcher getMatcher()
    Returns the last matcher used for evaluation.
    Returns:
      the matcher