public class SimpleRegexMatcher extends AbstractHeaderMatcher
IHeaderMatcher.Builder
Constructor and Description |
---|
SimpleRegexMatcher(String id,
Pattern pattern)
Constructs a regex pattern matcher with a unique random id and the specified
Regex pattern.
|
Modifier and Type | Method and Description |
---|---|
String |
getPattern() |
boolean |
matches(IHeaders headers)
Attempts to match text in the IHeaders instance.
|
getId, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDescription, reset
public SimpleRegexMatcher(String id, Pattern pattern)
id
- the id for this matcher, may be nullpattern
- the pattern to match. Pattern will only match a single line
from the input stream.public String getPattern()
public boolean matches(IHeaders headers)
IHeaderMatcher
headers
- the representations of the headers to checktrue
if the matcher matches the text, false
otherwise.Copyright © 2006–2024 Apache Software Foundation. All rights reserved.