Package org.apache.rat.analysis.matchers
Class NotMatcher
java.lang.Object
org.apache.rat.analysis.matchers.AbstractHeaderMatcher
org.apache.rat.analysis.matchers.NotMatcher
- All Implemented Interfaces:
IHeaderMatcher
An IHeaderMatcher that reverses the result of an enclosed matcher.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.rat.analysis.IHeaderMatcher
IHeaderMatcher.Builder
-
Constructor Summary
ConstructorsConstructorDescriptionNotMatcher
(String id, IHeaderMatcher enclosed) Create the matcher with the enclosed matcher and id. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Attempts to match text in the IHeaders instance.void
reset()
Resets this state of this matcher to its initial state in preparation for use with another document scan.Methods inherited from class org.apache.rat.analysis.matchers.AbstractHeaderMatcher
getId, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.rat.analysis.IHeaderMatcher
getDescription
-
Constructor Details
-
NotMatcher
Create the matcher with the enclosed matcher and id.- Parameters:
id
- the id for this matcher. May be nullenclosed
- the enclosed matcher
-
-
Method Details
-
getEnclosed
-
matches
Description copied from interface:IHeaderMatcher
Attempts to match text in the IHeaders instance.- Parameters:
headers
- the representations of the headers to check- Returns:
true
if the matcher matches the text,false
otherwise.
-
reset
public void reset()Description copied from interface:IHeaderMatcher
Resets this state of this matcher to its initial state in preparation for use with another document scan. In most cases this method does not need to do anything.
-