R
- the generic return type for all command signature methods
to support different implementor types; the methods of a
command factory for instance returns a command instance;
command builders can also implement this interface, but their
methods return the builder itself enabling for chained method
invocation to create joined commandspublic static interface Uniq.Interface<R> extends CommandInterface<R>
Modifier and Type | Method and Description |
---|---|
R |
uniq()
Reads from the standard input and compares adjacent lines, writing
one copy of each input line to the standard output.
|
R |
uniq(File file)
Reads from the specified input
file and compares adjacent
lines, writing one copy of each input line to the standard output. |
R |
uniq(String... args)
Reads the file specified by the
"--path" operand (the
default operand) and writes only unique lines to the standard
output. |
R |
uniq(String path)
Reads the file specified by its
path and compares adjacent
lines, writing one copy of each input line to the standard output. |
R |
uniq(UniqOptions options)
Reads from the standard input and compares adjacent lines, writing
one copy of each input line to the standard output.
|
R |
uniq(UniqOptions options,
File file)
Reads from the specified input
file and compares adjacent
lines, writing one copy of each input line to the standard output. |
R |
uniq(UniqOptions options,
String path)
Reads the file specified by its
path and compares adjacent
lines, writing one copy of each input line to the standard output. |
R uniq()
Note that repeated lines in the input are not detected if they are not adjacent (see --global or -g option); sorted input lines always result in unique output lines.
<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR uniq(String... args)
"--path"
operand (the
default operand) and writes only unique lines to the standard
output. The second and succeeding copies of repeated input lines are
not written to the output.
Options can be specified by acronym (with a leading dash "-") or by long name (with two leading dashes "--"). Operands other than the default "--path" operand have to be prefixed with the operand name.
Note that repeated lines in the input are not detected if they are not adjacent unless the --global is specified (sorted input lines always result in unique output lines).
args
- String arguments defining the options and operands for the command.
Options can be specified by acronym (with a leading dash "-") or by
long name (with two leading dashes "--"). Operands other than the
default "--path" operand have to be prefixed with the operand
name.<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR uniq(File file)
file
and compares adjacent
lines, writing one copy of each input line to the standard output.
The second and succeeding copies of repeated adjacent input lines
are not written to the output.
Note that repeated lines in the input are not detected if they are not adjacent (see --global or -g option); sorted input lines always result in unique output lines.
file
- The files or directories used as starting point for the listing;
relative paths are not resolved (use the string path argument to
enable relative path resolving based on the current working
directory).<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR uniq(String path)
path
and compares adjacent
lines, writing one copy of each input line to the standard output.
The second and succeeding copies of repeated adjacent input lines
are not written to the output.
Note that repeated lines in the input are not detected if they are not adjacent (see --global or -g option); sorted input lines always result in unique output lines.
path
- The files or directories used as starting point for the listing;
wildcards * and ? are supported; relative paths are resolved on the
basis of the current working directory.<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR uniq(UniqOptions options)
Note that repeated non-adjacent lines in the input are only detected with the --global or -g option. In other words, unique output lines are guaranteed only if either (a) the --global or -g option is specified, or (b) the input lines are sorted.
options
- The options defining the uniqueness details for the output lines.<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR uniq(UniqOptions options, File file)
file
and compares adjacent
lines, writing one copy of each input line to the standard output.
The second and succeeding copies of repeated adjacent input lines
are not written to the output.
Note that repeated non-adjacent lines in the input are only detected with the --global or -g option. In other words, unique output lines are guaranteed only if either (a) the --global or -g option is specified, or (b) the input lines are sorted.
options
- The options defining the uniqueness details for the output lines.file
- The files or directories used as starting point for the listing;
relative paths are not resolved (use the string path argument to
enable relative path resolving based on the current working
directory).<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR uniq(UniqOptions options, String path)
path
and compares adjacent
lines, writing one copy of each input line to the standard output.
The second and succeeding copies of repeated adjacent input lines
are not written to the output.
Note that repeated non-adjacent lines in the input are only detected with the --global or -g option. In other words, unique output lines are guaranteed only if either (a) the --global or -g option is specified, or (b) the input lines are sorted.
options
- The options defining the uniqueness details for the output lines.path
- The files or directories used as starting point for the listing;
wildcards * and ? are supported; relative paths are resolved on the
basis of the current working directory.<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsCopyright © 2024. All rights reserved.