public final class WcFactory extends Object implements Wc.Interface<WcCommand>
wc
command returning
a new command instance from every signature method.Modifier and Type | Field and Description |
---|---|
static WcFactory |
INSTANCE
The singleton instance of this factory.
|
Modifier and Type | Method and Description |
---|---|
WcCommand |
wc()
Executes a count of lines, words and chars contained in the standard
input and writes them to the standard output.
|
WcCommand |
wc(File... files)
Executes a count of lines, words and chars contained in each input
file and writes them to the standard output.
|
WcCommand |
wc(Input... inputs)
Executes a count of lines, words and chars contained in each input
and writes them to the standard output.
|
WcCommand |
wc(String... args)
One or several counts are executed and written to the standard
output.
|
WcCommand |
wc(WcOptions options)
Executes a one or more counts, depending on the given options, in
the standard input and writes them to the standard output.
|
WcCommand |
wc(WcOptions options,
File... files)
Executes a one or more counts, depending on the given options, in
each of the given input files and writes them to the standard
output.
|
WcCommand |
wc(WcOptions options,
Input... inputs)
Executes a one or more counts, depending on the given options, in
each of the given inputs and writes them to the standard
output.
|
WcCommand |
wc(WcOptions options,
String[] paths)
Executes a one or more counts, depending on the given options, in
each of the given input files and writes them to the standard
output.
|
public WcCommand wc()
Wc.Interface
wc
in interface Wc.Interface<WcCommand>
<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 WcCommand wc(String... args)
Wc.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.
wc
in interface Wc.Interface<WcCommand>
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.<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 WcCommand wc(File... files)
Wc.Interface
wc
in interface Wc.Interface<WcCommand>
files
- The input files; 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 WcCommand wc(Input... inputs)
Wc.Interface
wc
in interface Wc.Interface<WcCommand>
inputs
- The inputs.<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 WcCommand wc(WcOptions options)
Wc.Interface
wc
in interface Wc.Interface<WcCommand>
options
- The options defining command behavior.<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 WcCommand wc(WcOptions options, File... files)
Wc.Interface
wc
in interface Wc.Interface<WcCommand>
options
- The options defining command behavior.files
- The input files; 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 WcCommand wc(WcOptions options, String[] paths)
Wc.Interface
wc
in interface Wc.Interface<WcCommand>
options
- The options defining command behavior.paths
- Path names of the input files; 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 WcCommand wc(WcOptions options, Input... inputs)
Wc.Interface
wc
in interface Wc.Interface<WcCommand>
options
- The options defining command behavior.inputs
- The inputs.<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.