class CheckProcessor extends AbstractSortProcessor
ExitValueExceptionif the file is not sorted.
|Constructor and Description|
|Modifier and Type||Method and Description|
Indicates that this line processing task is complete and can finished.
Processes a single line and returns true if this
Resets the last line, for instance when a new file should be checked.
getArguments, getCommand, getContext, getOutput
public CheckProcessor(SortCommand command, ExecutionContext context, LineProcessor output)
public boolean processLine(Line line)
LineProcessoris ready to process more lines. Returning false indicates that the process can be
finishedbecause subsequent lines would not change the result anyway.
line- the line to process
LineProcessoris ready to process more lines, and false if it does not require any more input lines
public void finish()
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.
public void reset()
Copyright © 2022. All rights reserved.