Package org.apache.rat.analysis.matchers
Class AndMatcher
java.lang.Object
org.apache.rat.analysis.matchers.AbstractHeaderMatcher
org.apache.rat.analysis.matchers.AbstractMatcherContainer
org.apache.rat.analysis.matchers.AndMatcher
- All Implemented Interfaces:
IHeaderMatcher
A matcher that performs a logical
AND across all the contained
matchers.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.rat.analysis.IHeaderMatcher
IHeaderMatcher.Builder -
Constructor Summary
ConstructorsConstructorDescriptionAndMatcher(String id, Collection<? extends IHeaderMatcher> enclosed, String resource)Constructs the AndMatcher with the specified id and enclosed collection.AndMatcher(Collection<? extends IHeaderMatcher> enclosed, String resource)Constructs the AndMatcher with a unique random id and the enclosed collection. -
Method Summary
Methods inherited from class org.apache.rat.analysis.matchers.AbstractMatcherContainer
getEnclosed, getResource, resetMethods inherited from class org.apache.rat.analysis.matchers.AbstractHeaderMatcher
getId, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.rat.analysis.IHeaderMatcher
getDescription
-
Constructor Details
-
AndMatcher
Constructs the AndMatcher with the specified id and enclosed collection.- Parameters:
id- the id to use. If null or an empty string a unique random id will be created.enclosed- the enclosed collection.resource- the name of the resource the collection was read from if any. May be null.
-
AndMatcher
Constructs the AndMatcher with a unique random id and the enclosed collection.- Parameters:
enclosed- the enclosed collection.resource- the name of the resource the collection was read from if any. May be null.
-
-
Method Details
-
matches
Description copied from interface:IHeaderMatcherAttempts to match text in the IHeaders instance.- Parameters:
headers- the representations of the headers to check- Returns:
trueif the matcher matches the text,falseotherwise.
-