public final class SortFactory extends Object implements Sort.Interface<SortCommand>
sort
command returning
a new command instance from every signature method.Modifier and Type | Field and Description |
---|---|
static SortFactory |
INSTANCE
The singleton instance of this factory.
|
Modifier and Type | Method and Description |
---|---|
SortCommand |
sort()
Sort the lines read from the standard input and writes the result to
the standard output.
|
SortCommand |
sort(Comparator<? super Line> comparator)
Sort the lines read from the standard input and writes the result to
the standard output.
|
SortCommand |
sort(Comparator<? super Line> comparator,
File... files)
Sort the lines of all the specified files together and writes the
result to the standard output.
|
SortCommand |
sort(Comparator<? super Line> comparator,
Input... inputs)
Sort the lines of all the specified inputs together and writes the
result to the standard output.
|
SortCommand |
sort(Comparator<? super Line> comparator,
String... paths)
Sort the lines of all the specified files together and writes the
result to the standard output.
|
SortCommand |
sort(File... files)
Sort the lines of all the specified files together and writes the
result to the standard output.
|
SortCommand |
sort(Input... inputs)
Sort the lines of all the specified inputs together and writes the
result to the standard output.
|
SortCommand |
sort(SortOptions options)
Sorts, merges, or sequence checks the lines read from the standard
input and writes the result to the standard output.
|
SortCommand |
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.
|
SortCommand |
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.
|
SortCommand |
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.
|
SortCommand |
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.
|
SortCommand |
sort(SortOptions options,
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.
|
SortCommand |
sort(SortOptions options,
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.
|
SortCommand |
sort(SortOptions options,
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.
|
SortCommand |
sort(String... args)
Sort the lines of all the specified files together and writes the
result to the standard output.
|
public static final SortFactory INSTANCE
public SortCommand sort()
Sort.Interface
Comparisons are based on the entire line without line ending. The collating sequence of the current locale is used to perform the comparisons.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort.
sort
in interface Sort.Interface<SortCommand>
<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
detailspublic SortCommand sort(String... args)
Sort.Interface
Options can be specified by acronym (with a leading dash "-") or by long name (with two leading dashes "--"). Operands other than the default "--paths" operand have to be prefixed with the operand name.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort. If two lines originate from different input files, the index of the file in the input arguments list defines the ordering of the lines.
sort
in interface Sort.Interface<SortCommand>
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 "--paths" operand have to be prefixed with the operand
name (e.g. "--comparator" for a subsequent comparator operand value).<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
detailspublic SortCommand sort(File... files)
Sort.Interface
Comparisons are based on the entire line without line ending. The collating sequence of the current locale is used to perform the comparisons.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort. If two lines originate from different input files, the index of the file in the input arguments list defines the ordering of the lines.
sort
in interface Sort.Interface<SortCommand>
files
- The files to be sorted or merged; relative paths are not resolved
(use the string paths 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
detailspublic SortCommand sort(Input... inputs)
Sort.Interface
Comparisons are based on the entire line without line ending. The collating sequence of the current locale is used to perform the comparisons.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort. If two lines originate from different inputs, the index of the input in the arguments list defines the ordering of the lines.
sort
in interface Sort.Interface<SortCommand>
inputs
- The inputs to be sorted or merged.<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
detailspublic SortCommand sort(Comparator<? super Line> comparator)
Sort.Interface
Line comparisons are based on the specified comparator
.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort.
sort
in interface Sort.Interface<SortCommand>
comparator
- The comparator to use for the line comparisons.<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
detailspublic SortCommand sort(Comparator<? super Line> comparator, File... files)
Sort.Interface
Line comparisons are based on the specified comparator
.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort. If two lines originate from different input files, the index of the file in the input arguments list defines the ordering of the lines.
sort
in interface Sort.Interface<SortCommand>
comparator
- The comparator to use for the line comparisons.files
- The files to be sorted or merged; relative paths are not resolved
(use the string paths 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
detailspublic SortCommand sort(Comparator<? super Line> comparator, String... paths)
Sort.Interface
Line comparisons are based on the specified comparator
.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort. If two lines originate from different input files, the index of the file in the input arguments list defines the ordering of the lines.
sort
in interface Sort.Interface<SortCommand>
comparator
- The comparator to use for the line comparisons.paths
- Path names of the files to be sorted, merged, or checked; 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
detailspublic SortCommand sort(Comparator<? super Line> comparator, Input... inputs)
Sort.Interface
Line comparisons are based on the specified comparator
.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort. If two lines originate from different inputs, the index of the input in the arguments list defines the ordering of the lines.
sort
in interface Sort.Interface<SortCommand>
comparator
- The comparator to use for the line comparisons.inputs
- The inputs to be sorted or merged.<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
detailspublic SortCommand sort(SortOptions options)
Sort.Interface
Comparisons are based on the entire line without line ending. The collating sequence of the current locale is used to perform the comparisons.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort.
sort
in interface Sort.Interface<SortCommand>
options
- The options for the sort command.<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
detailspublic SortCommand sort(SortOptions options, File... files)
Sort.Interface
Comparisons are based on the entire line without line ending. The collating sequence of the current locale is used to perform the comparisons.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort. If two lines originate from different input files, the index of the file in the input arguments list defines the ordering of the lines.
sort
in interface Sort.Interface<SortCommand>
options
- The options for the sort command.files
- The files to be sorted or merged; relative paths are not resolved
(use the string paths 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
detailspublic SortCommand sort(SortOptions options, String... paths)
Sort.Interface
Comparisons are based on the entire line without line ending. The collating sequence of the current locale is used to perform the comparisons.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort. If two lines originate from different input files, the index of the file in the input arguments list defines the ordering of the lines.
sort
in interface Sort.Interface<SortCommand>
options
- The options for the sort command.paths
- Path names of the files to be sorted, merged, or checked; 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
detailspublic SortCommand sort(SortOptions options, Input... inputs)
Sort.Interface
Comparisons are based on the entire line without line ending. The collating sequence of the current locale is used to perform the comparisons.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort. If two lines originate from different inputs, the index of the input in the arguments list defines the ordering of the lines.
sort
in interface Sort.Interface<SortCommand>
options
- The options for the sort command.inputs
- The inputs to be sorted or merged.<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
detailspublic SortCommand sort(SortOptions options, Comparator<? super Line> comparator)
Sort.Interface
Line comparisons are based on the specified comparator
.
All comparison related options are ignored except for
--reverse
.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort.
sort
in interface Sort.Interface<SortCommand>
options
- The options for the sort command.comparator
- The comparator to use for the line comparisons.<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
detailspublic SortCommand sort(SortOptions options, Comparator<? super Line> comparator, File... files)
Sort.Interface
Line comparisons are based on the specified comparator
.
All comparison related options except for --reverse
are
ignored.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort. If two lines originate from different input files, the index of the file in the input arguments list defines the ordering of the lines.
sort
in interface Sort.Interface<SortCommand>
options
- The options for the sort command.comparator
- The comparator to use for the line comparisons.files
- The files to be sorted or merged; relative paths are not resolved
(use the string paths 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
detailspublic SortCommand sort(SortOptions options, Comparator<? super Line> comparator, String... paths)
Sort.Interface
Line comparisons are based on the specified comparator
.
All comparison related options except for --reverse
are
ignored.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort. If two lines originate from different input files, the index of the file in the input arguments list defines the ordering of the lines.
sort
in interface Sort.Interface<SortCommand>
options
- The options for the sort command.comparator
- The comparator to use for the line comparisons.paths
- Path names of the files to be sorted, merged, or checked; 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
detailspublic SortCommand sort(SortOptions options, Comparator<? super Line> comparator, Input... inputs)
Sort.Interface
Line comparisons are based on the specified comparator
.
All comparison related options except for --reverse
are
ignored.
The sort algorithm used is guaranteed to be stable: lines considered equal will not be reordered as a result of the sort. If two lines originate from different inputs, the index of the input in the arguments list defines the ordering of the lines.
sort
in interface Sort.Interface<SortCommand>
options
- The options for the sort command.comparator
- The comparator to use for the line comparisons.inputs
- The inputs to be sorted or merged.<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.