Package org.apache.rat.analysis.matchers
Class AbstractMatcherContainer
java.lang.Object
org.apache.rat.analysis.matchers.AbstractHeaderMatcher
org.apache.rat.analysis.matchers.AbstractMatcherContainer
- All Implemented Interfaces:
IHeaderMatcher
- Direct Known Subclasses:
AndMatcher
,OrMatcher
A class that implements IHeaderMatcher as a collection of other IHeaderMatchers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.rat.analysis.IHeaderMatcher
IHeaderMatcher.Builder, IHeaderMatcher.State
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAbstractMatcherContainer(String id, Collection<? extends IHeaderMatcher> enclosed)
Constructs the abstract matcher container.AbstractMatcherContainer(Collection<? extends IHeaderMatcher> enclosed)
Constructs the abstract matcher container with a unique random id. -
Method Summary
Modifier and TypeMethodDescriptionGets the final state for this matcher.void
reset()
Resets this stateState.i
.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
currentState, matches
-
Field Details
-
enclosed
-
-
Constructor Details
-
AbstractMatcherContainer
Constructs the abstract matcher container. If theid
is not set then a unique random identifier is created. Theenclosed
collection is preserved in a new collection that retains the order of of the original collection.- Parameters:
id
- The id for the matcher.enclosed
- the collection of enclosed matchers.
-
AbstractMatcherContainer
Constructs the abstract matcher container with a unique random id. Theenclosed
collection is preserved in a new collection that retains the order of of the original collection.- Parameters:
enclosed
- the collection of enclosed matchers.
-
-
Method Details
-
reset
public void reset()Description copied from interface:IHeaderMatcher
Resets this stateState.i
. If text is being cached this method should clear that cache. -
finalizeState
Description copied from interface:IHeaderMatcher
Gets the final state for this matcher. This is called after the EOF on the input. At this point there should be no matchers in anState.i
state.
-