abstract class AbstractGrepProcessor extends AbstractLineProcessor<GrepArguments>
Constructor and Description |
---|
AbstractGrepProcessor(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.
|
boolean |
processLine(Line line)
Processes a single line and returns true if this
LineProcessor is
ready to process more lines. |
protected abstract boolean |
processLine(Line line,
boolean isMatch) |
getArguments, getCommand, getContext, getOutput
public AbstractGrepProcessor(GrepCommand command, ExecutionContext context, LineProcessor output, LineMatcher matcher)
public boolean processLine(Line line)
LineProcessor
LineProcessor
is
ready to process more lines. Returning false indicates that the process
can be finished
because subsequent lines would not
change the result anyway.line
- the line to processLineProcessor
is ready to process more
lines, and false if it does not require any more input linespublic 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.
protected abstract boolean processLine(Line line, boolean isMatch)
Copyright © 2024. All rights reserved.