Package org.apache.rat.analysis.matchers
Class OrMatcher
java.lang.Object
org.apache.rat.analysis.matchers.AbstractHeaderMatcher
org.apache.rat.analysis.matchers.AbstractMatcherContainer
org.apache.rat.analysis.matchers.OrMatcher
- All Implemented Interfaces:
IHeaderMatcher
A matcher that performs a logical
OR
across all the contained matchers.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.rat.analysis.IHeaderMatcher
IHeaderMatcher.Builder
-
Constructor Summary
ConstructorsConstructorDescriptionOrMatcher
(String id, Collection<? extends IHeaderMatcher> enclosed, String resource) Constructs the matcher with the specified id from the enclosed matchers.OrMatcher
(Collection<? extends IHeaderMatcher> enclosed, String resource) Constructs the matcher from the enclosed matchers. -
Method Summary
Methods inherited from class org.apache.rat.analysis.matchers.AbstractMatcherContainer
getEnclosed, getResource, reset
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
-
OrMatcher
Constructs the matcher from the enclosed matchers.- Parameters:
enclosed
- the enclosed matchers.resource
- the name of the resource if the collection of matchers was read from a file or resource. May benull
.
-
OrMatcher
Constructs the matcher with the specified id from the enclosed matchers.- Parameters:
id
- the id to use.enclosed
- the enclosed matchers.resource
- the name of the resource if the collection of matchers was read from a file or resource. May benull
.
-
-
Method Details
-
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.
-