Package org.apache.rat.testhelpers
Class TestingMatcher
java.lang.Object
org.apache.rat.analysis.matchers.AbstractHeaderMatcher
org.apache.rat.testhelpers.TestingMatcher
- All Implemented Interfaces:
IHeaderMatcher
A matcher for testing.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.rat.analysis.IHeaderMatcher
IHeaderMatcher.Builder -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a matcher with an id of"dfltMtch"that does not match anything.TestingMatcher(boolean result) Constructs a matcher with the specified id and matching result.TestingMatcher(String id, boolean result) Constructs a matcher with the specified id and matching result.TestingMatcher(String id, boolean... results) Constructs a matcher with the specified id that returns the matching values in order. -
Method Summary
Methods 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
-
TestingMatcher
public TestingMatcher()Constructs a matcher with an id of"dfltMtch"that does not match anything. -
TestingMatcher
public TestingMatcher(boolean result) Constructs a matcher with the specified id and matching result.- Parameters:
result- iftruewill match everything, otherwise it matches nothing.
-
TestingMatcher
Constructs a matcher with the specified id and matching result.- Parameters:
id- the id for this matcher.result- iftruewill match everything, otherwise it matches nothing.
-
TestingMatcher
Constructs a matcher with the specified id that returns the matching values in order. Will throw NullPointerException if morematches()are called than there are results.- Parameters:
id- the id of the matcher.results- the result for each call to match.
-
-
Method Details
-
matches
-
reset
public void reset()
-