final class CountMatchingLinesProcessor extends AbstractGrepProcessor
LineMatcher
passed to the constructor.Constructor and Description |
---|
CountMatchingLinesProcessor(GrepCommand command,
ExecutionContext context,
LineProcessor output,
LineMatcher matcher) |
Modifier and Type | Method and Description |
---|---|
void |
finish()
Indicates that this line processing task is complete and can finished.
|
protected boolean |
processLine(Line line,
boolean isMatch) |
processLine
getArguments, getCommand, getContext, getOutput
public CountMatchingLinesProcessor(GrepCommand command, ExecutionContext context, LineProcessor output, LineMatcher matcher)
protected boolean processLine(Line line, boolean isMatch)
processLine
in class AbstractGrepProcessor
public void finish()
LineProcessor
Simple output devices usually perform a flush
operation in this
method. More complex commands may perform the real operation in this
method, for instance write the total count of lines or words to the
target file or stream.
finish
in interface LineProcessor
finish
in class AbstractGrepProcessor
Copyright © 2024. All rights reserved.