Package | Description |
---|---|
org.unix4j |
Provides a single class
Unix4j with static methods
serving as entry point to build commands and command chains joining several
commands. |
org.unix4j.builder |
Defines interfaces and implementations used to create a command or a chain of
joined commands.
|
org.unix4j.io |
Contains interfaces and classes used to handle input and output of commands.
|
org.unix4j.line |
Contains the
Line interface used for
line-by-line processing of input data and provides two alternative line
implementations. |
org.unix4j.operation |
Contains the
LineOperation
interface and the AdHocCommand
implementation facilitating the creation of ad-hoc commands. |
org.unix4j.processor |
Defines
LineProcessor and
InputProcessor , two interfaces
used for line-by-line input processing, and provides some basic
implementations for both interfaces. |
org.unix4j.unix |
Provides implementations for commands inspired by well known unix commands.
|
org.unix4j.unix.cat |
Contains private classes used by the
cat command. |
org.unix4j.unix.grep |
Contains private classes used by the
grep command. |
org.unix4j.unix.head |
Contains private classes used by the
head command. |
org.unix4j.unix.sed |
Contains private classes used by the
sed command. |
org.unix4j.unix.sort |
Contains private classes used by the
sort command. |
org.unix4j.unix.tail |
Contains private classes used by the
tail command. |
org.unix4j.unix.uniq |
Contains private classes used by the
uniq command. |
org.unix4j.unix.wc |
Contains private classes used by the
wc command. |
org.unix4j.unix.xargs |
Contains private classes used by the
xargs command. |
org.unix4j.util |
Provides a set of utility classes used throughout the unix4j framework.
|
org.unix4j.util.sort |
Contains interfaces and classes related to sorting.
|
Modifier and Type | Method and Description |
---|---|
static Unix4jCommandBuilder |
Unix4j.sort(Comparator<? super Line> comparator,
File... files)
Sort the lines of all the specified files together and writes the
result to the standard output.
|
static Unix4jCommandBuilder |
Unix4j.sort(Comparator<? super Line> comparator,
Input... inputs)
Sort the lines of all the specified inputs together and writes the
result to the standard output.
|
static Unix4jCommandBuilder |
Unix4j.sort(Comparator<? super Line> comparator,
String... paths)
Sort the lines of all the specified files together and writes the
result to the standard output.
|
static Unix4jCommandBuilder |
Unix4j.sort(SortOptions options,
Comparator<? super Line> comparator,
File... files)
Sorts, merges, or sequence checks the lines the lines of all the
specified files together and writes the result to the standard
output.
|
static Unix4jCommandBuilder |
Unix4j.sort(SortOptions options,
Comparator<? super Line> comparator,
Input... inputs)
Sorts, merges, or sequence checks the lines the lines of all the
specified inputs together and writes the result to the standard
output.
|
static Unix4jCommandBuilder |
Unix4j.sort(SortOptions options,
Comparator<? super Line> comparator,
String... paths)
Sorts, merges, or sequence checks the lines the lines of all the
specified files together and writes the result to the standard
output.
|
Modifier and Type | Method and Description |
---|---|
List<Line> |
DefaultCommandBuilder.toLineList() |
List<Line> |
To.toLineList()
Executes the composite command and returns the result as a list
containing the output lines.
|
Stream<Line> |
DefaultCommandBuilder.toLineStream() |
Stream<Line> |
To.toLineStream()
Executes the composite command and returns the result as a stream
containing the output lines.
|
Modifier and Type | Method and Description |
---|---|
Line |
IteratorInput.readLine() |
Line |
BufferedInput.readLine() |
Line |
CompositeInput.readLine() |
Line |
StringInput.readLine() |
Line |
NullInput.readLine() |
Line |
ReaderInput.readLine() |
Line |
Input.readLine()
Reads the next line.
|
Modifier and Type | Method and Description |
---|---|
List<Line> |
BufferedOutput.asList()
Returns a new list with the lines currently stored by this
BufferdOutput object. |
Iterator<Line> |
AbstractInput.iterator() |
Iterator<Line> |
StringInput.iterator() |
Iterator<Line> |
Input.iterator()
Returns an immutable iterator over all lines returned by this input
object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
NullOutput.processLine(Line line) |
boolean |
WriterOutput.processLine(Line line) |
boolean |
BufferedOutput.processLine(Line line) |
boolean |
Output.processLine(Line line)
Writes a line to the output.
|
Constructor and Description |
---|
BufferedInput(LinkedList<Line> buffer)
Constructor with linked list used as source of the input lines.
|
BufferedOutput(List<Line> buffer)
Constructor using the specified list as line buffer.
|
IteratorInput(Iterator<? extends Line> lines)
Constructor with linked list used as source of the input lines.
|
Modifier and Type | Class and Description |
---|---|
class |
SimpleLine
A
Line implementation based on two CharSequence 's, usually
two strings one for the contents and one for the line ending characters. |
class |
SingleCharSequenceLine
|
Modifier and Type | Field and Description |
---|---|
static Line |
Line.EMPTY_LINE
Line with empty content string and a default operating system dependent
line ending as defined by
LINE_ENDING . |
Modifier and Type | Method and Description |
---|---|
static Line |
SimpleLine.subLine(Line line,
int start,
int end,
boolean preserveLineEnding)
Returns a sub-line of the given
line , similar to a substring or
the method SimpleLine.subSequence(int, int) . |
Modifier and Type | Method and Description |
---|---|
static Line |
SimpleLine.subLine(Line line,
int start,
int end,
boolean preserveLineEnding)
Returns a sub-line of the given
line , similar to a substring or
the method SimpleLine.subSequence(int, int) . |
Modifier and Type | Method and Description |
---|---|
void |
LineOperation.operate(ExecutionContext context,
Line input,
LineProcessor output)
Performs an operation for the given input line.
|
Modifier and Type | Method and Description |
---|---|
boolean |
DefaultInputProcessor.processLine(Input input,
Line line,
LineProcessor output) |
boolean |
InputProcessor.processLine(Input input,
Line line,
LineProcessor output)
Processes a single line and returns true if this
InputProcessor
is ready to process more lines. |
boolean |
InputLineProcessor.processLine(Line line) |
boolean |
LineProcessor.processLine(Line line)
Processes a single line and returns true if this
LineProcessor is
ready to process more lines. |
boolean |
MultipleInputLineProcessor.processLine(Line line) |
Modifier and Type | Method and Description |
---|---|
Unix4jCommandBuilder |
Unix4jCommandBuilder.sort(Comparator<? super Line> comparator)
Sort the lines read from the standard input and writes the result to
the standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.sort(Comparator<? super Line> comparator) |
R |
Sort.Interface.sort(Comparator<? super Line> comparator)
Sort the lines read from the standard input and writes the result to
the standard output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.sort(Comparator<? super Line> comparator,
File... files)
Sort the lines of all the specified files together and writes the
result to the standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.sort(Comparator<? super Line> comparator,
File... files) |
R |
Sort.Interface.sort(Comparator<? super Line> comparator,
File... files)
Sort the lines of all the specified files together and writes the
result to the standard output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.sort(Comparator<? super Line> comparator,
Input... inputs)
Sort the lines of all the specified inputs together and writes the
result to the standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.sort(Comparator<? super Line> comparator,
Input... inputs) |
R |
Sort.Interface.sort(Comparator<? super Line> comparator,
Input... inputs)
Sort the lines of all the specified inputs together and writes the
result to the standard output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.sort(Comparator<? super Line> comparator,
String... paths)
Sort the lines of all the specified files together and writes the
result to the standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.sort(Comparator<? super Line> comparator,
String... paths) |
R |
Sort.Interface.sort(Comparator<? super Line> comparator,
String... paths)
Sort the lines of all the specified files together and writes the
result to the standard output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.sort(SortOptions options,
Comparator<? super Line> comparator)
Sorts, merges, or sequence checks the lines read from the standard
input and writes the result to the standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.sort(SortOptions options,
Comparator<? super Line> comparator) |
R |
Sort.Interface.sort(SortOptions options,
Comparator<? super Line> comparator)
Sorts, merges, or sequence checks the lines read from the standard
input and writes the result to the standard output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.sort(SortOptions options,
Comparator<? super Line> comparator,
File... files)
Sorts, merges, or sequence checks the lines the lines of all the
specified files together and writes the result to the standard
output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.sort(SortOptions options,
Comparator<? super Line> comparator,
File... files) |
R |
Sort.Interface.sort(SortOptions options,
Comparator<? super Line> comparator,
File... files)
Sorts, merges, or sequence checks the lines the lines of all the
specified files together and writes the result to the standard
output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.sort(SortOptions options,
Comparator<? super Line> comparator,
Input... inputs)
Sorts, merges, or sequence checks the lines the lines of all the
specified inputs together and writes the result to the standard
output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.sort(SortOptions options,
Comparator<? super Line> comparator,
Input... inputs) |
R |
Sort.Interface.sort(SortOptions options,
Comparator<? super Line> comparator,
Input... inputs)
Sorts, merges, or sequence checks the lines the lines of all the
specified inputs together and writes the result to the standard
output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.sort(SortOptions options,
Comparator<? super Line> comparator,
String... paths)
Sorts, merges, or sequence checks the lines the lines of all the
specified files together and writes the result to the standard
output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.sort(SortOptions options,
Comparator<? super Line> comparator,
String... paths) |
R |
Sort.Interface.sort(SortOptions options,
Comparator<? super Line> comparator,
String... paths)
Sorts, merges, or sequence checks the lines the lines of all the
specified files together and writes the result to the standard
output.
|
Modifier and Type | Method and Description |
---|---|
boolean |
NumberLinesProcessor.processLine(Line line) |
boolean |
SqueezeEmptyLinesProcessor.processLine(Line line) |
boolean |
CatProcessor.processLine(Line line) |
Modifier and Type | Method and Description |
---|---|
boolean |
LineMatcher.matches(Line line)
Returns true if the given
line matches, and false otherwise. |
boolean |
InvertedMatcher.matches(Line line) |
boolean |
RegexpMatcher.matches(Line line) |
boolean |
FixedStringMatcher.Standard.matches(Line line) |
boolean |
FixedStringMatcher.IgnoreCase.matches(Line line) |
boolean |
FixedStringMatcher.WholeLine.matches(Line line) |
boolean |
FixedStringMatcher.WholeLineIgnoreCase.matches(Line line) |
boolean |
CountMatchingLinesInputProcessor.processLine(Input input,
Line line,
LineProcessor output) |
boolean |
WriteMatchingLinesInputProcessor.processLine(Input input,
Line line,
LineProcessor output) |
boolean |
WriteFilesWithMatchingLinesProcessor.processLine(Input input,
Line line,
LineProcessor output) |
boolean |
CountMatchingLinesInputProcessor.processLine(Line line) |
boolean |
AbstractGrepProcessor.processLine(Line line) |
boolean |
WriteFilesWithMatchingLinesProcessor.processLine(Line line) |
protected boolean |
WriteMatchingLinesProcessor.processLine(Line line,
boolean isMatch) |
protected boolean |
WriteMatchingLinesWithLineNumberProcessor.processLine(Line line,
boolean isMatch) |
protected boolean |
CountMatchingLinesProcessor.processLine(Line line,
boolean isMatch) |
protected abstract boolean |
AbstractGrepProcessor.processLine(Line line,
boolean isMatch) |
Modifier and Type | Method and Description |
---|---|
boolean |
HeadCharsProcessor.processLine(Line line) |
boolean |
HeadLinesProcessor.processLine(Line line) |
Modifier and Type | Method and Description |
---|---|
boolean |
InsertProcessor.processLine(Line line) |
boolean |
PrintProcessor.processLine(Line line) |
boolean |
AppendProcessor.processLine(Line line) |
boolean |
TranslateProcessor.processLine(Line line) |
boolean |
ChangeProcessor.processLine(Line line) |
boolean |
DeleteProcessor.processLine(Line line) |
boolean |
SubstituteProcessor.processLine(Line line) |
Modifier and Type | Method and Description |
---|---|
protected Comparator<? super Line> |
AbstractSortProcessor.getComparator() |
Comparator<? super Line> |
SortArguments.getComparator()
Returns the
<comparator> operand value: The comparator to use for the line comparisons. |
Modifier and Type | Method and Description |
---|---|
boolean |
MergeProcessor.processLine(Line line) |
boolean |
SortProcessor.processLine(Line line) |
boolean |
CheckProcessor.processLine(Line line) |
boolean |
UniqueSortProcessor.processLine(Line line) |
Modifier and Type | Method and Description |
---|---|
void |
SortArguments.setComparator(Comparator<? super Line> comparator)
Sets
<comparator> : The comparator to use for the line comparisons. |
SortCommand |
SortFactory.sort(Comparator<? super Line> comparator) |
SortCommand |
SortFactory.sort(Comparator<? super Line> comparator,
File... files) |
SortCommand |
SortFactory.sort(Comparator<? super Line> comparator,
Input... inputs) |
SortCommand |
SortFactory.sort(Comparator<? super Line> comparator,
String... paths) |
SortCommand |
SortFactory.sort(SortOptions options,
Comparator<? super Line> comparator) |
SortCommand |
SortFactory.sort(SortOptions options,
Comparator<? super Line> comparator,
File... files) |
SortCommand |
SortFactory.sort(SortOptions options,
Comparator<? super Line> comparator,
Input... inputs) |
SortCommand |
SortFactory.sort(SortOptions options,
Comparator<? super Line> comparator,
String... paths) |
Modifier and Type | Method and Description |
---|---|
boolean |
TailLinesFromStartProcessor.processLine(Line line) |
boolean |
TailCharsFromEndProcessor.processLine(Line line) |
boolean |
TailLinesFromEndProcessor.processLine(Line line) |
boolean |
TailCharsFromStartProcessor.processLine(Line line) |
Modifier and Type | Field and Description |
---|---|
protected Line |
AdjacentProcessor.curLine |
Modifier and Type | Field and Description |
---|---|
protected Map<Line,Long> |
GlobalProcessor.lineToCount |
Modifier and Type | Method and Description |
---|---|
boolean |
UniqProcessor.processLine(Line line) |
protected abstract boolean |
UniqProcessor.processLine(Line line,
LineProcessor output) |
protected boolean |
AdjacentProcessor.Normal.processLine(Line line,
LineProcessor output) |
protected boolean |
AdjacentProcessor.UniqueDuplicateCount.processLine(Line line,
LineProcessor output) |
protected boolean |
GlobalProcessor.Normal.processLine(Line line,
LineProcessor output) |
protected boolean |
GlobalProcessor.UniqueDuplicateCount.processLine(Line line,
LineProcessor output) |
static int |
CountUtil.writeCountLine(Line line,
long count,
int countDigits,
LineProcessor output)
Writes the given line prefixed with the count using the format
' ' + <count> + ' ' + <line> and using CountUtil.formatCount(long, int) to format <count> . |
protected abstract void |
GlobalProcessor.UniqueDuplicateCount.writeLine(Line line,
long count,
int maxCountDigits,
LineProcessor output) |
protected void |
GlobalProcessor.UniqueOnly.writeLine(Line line,
long count,
int maxCountDigits,
LineProcessor output) |
protected void |
GlobalProcessor.DuplicateOnly.writeLine(Line line,
long count,
int maxCountDigits,
LineProcessor output) |
protected void |
GlobalProcessor.Count.writeLine(Line line,
long count,
int maxCountDigits,
LineProcessor output) |
protected abstract void |
AdjacentProcessor.UniqueDuplicateCount.writeLine(Line line,
long count,
LineProcessor output) |
protected void |
AdjacentProcessor.UniqueOnly.writeLine(Line line,
long count,
LineProcessor output) |
protected void |
AdjacentProcessor.DuplicateOnly.writeLine(Line line,
long count,
LineProcessor output) |
protected void |
AdjacentProcessor.Count.writeLine(Line line,
long count,
LineProcessor output) |
Modifier and Type | Method and Description |
---|---|
abstract int |
CounterType.count(Line line)
Returns the count by which a counter should be incremented given the
specified
line . |
boolean |
WcFileProcessor.processLine(Input input,
Line line,
LineProcessor output) |
boolean |
WcMultipleFilesProcessor.processLine(Line line) |
boolean |
WcProcessor.processLine(Line line) |
void |
Counters.update(Line line)
Updates all the relevant counters based on the specified
line . |
Modifier and Type | Method and Description |
---|---|
void |
Itemizer.itemizeLine(Line line,
ItemStorage itemStorage)
Itemize the given line and stores all found items in the item storage.
|
void |
WhitespaceItemizer.itemizeLine(Line line,
ItemStorage itemStorage) |
void |
CharDelimitedItemizer.itemizeLine(Line line,
ItemStorage itemStorage) |
boolean |
XargsOutput.processLine(Line line) |
boolean |
XargsLineProcessor.processLine(Line line) |
Modifier and Type | Method and Description |
---|---|
static List<Line> |
StringUtil.splitLines(String s)
Splits the given string into lines and returns each line as a separate
string in the result list.
|
Modifier and Type | Method and Description |
---|---|
static String |
LineUtil.toMultiLineString(List<? extends Line> lines)
Returns a multi-line representation of the provided
lines . |
Modifier and Type | Method and Description |
---|---|
int |
LineComparator.compare(Line line1,
Line line2) |
Copyright © 2024. All rights reserved.