class SortProcessor extends AbstractSortProcessor
ArrayListto cache and sort the lines.
|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
getArguments, getCommand, getContext, getOutput
public SortProcessor(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.
Copyright © 2022. All rights reserved.