public final class CutFactory extends Object implements Cut.Interface<CutCommand>
cut
command returning
a new command instance from every signature method.Modifier and Type | Field and Description |
---|---|
static CutFactory |
INSTANCE
The singleton instance of this factory.
|
Modifier and Type | Method and Description |
---|---|
CutCommand |
cut(CutOptions options,
int... indexes)
Cuts the fields or characters using the given indexes
from the input line and writes them to the output.
|
CutCommand |
cut(CutOptions options,
Range range)
Cuts the fields or characters using the given range
from the input line and writes them to the output.
|
CutCommand |
cut(CutOptions options,
String delimiter,
char outputDelimiter,
int... indexes)
Cuts the fields using the given indexes and using the given delimiter
from the input line and writes them to the output using the given outputDelimiter.
|
CutCommand |
cut(CutOptions options,
String delimiter,
char outputDelimiter,
Range range)
Cuts the fields using the given range and using the given delimiter
from the input line and writes them to the output using the given outputDelimiter.
|
CutCommand |
cut(CutOptions options,
String delimiter,
int... indexes)
Cuts the fields using the given indexes
from the input line and writes them to the output.
|
CutCommand |
cut(CutOptions options,
String delimiter,
Range range)
Cuts the fields using the given range
from the input line and writes them to the output.
|
CutCommand |
cut(String... args)
Cuts the fields or characters from the input line and writes them to
the standard output.
|
public static final CutFactory INSTANCE
public CutCommand cut(String... args)
Cut.Interface
cut
in interface Cut.Interface<CutCommand>
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 "--range" operand have to be prefixed with the operand name
(e.g. "--indexes" for subsequent index operand values).<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 CutCommand cut(CutOptions options, Range range)
Cut.Interface
cut
in interface Cut.Interface<CutCommand>
options
- options for the cut commandrange
- select only these fields<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 CutCommand cut(CutOptions options, int... indexes)
Cut.Interface
cut
in interface Cut.Interface<CutCommand>
options
- options for the cut commandindexes
- select these chars/field based on the given indexes. Indexes are 1 based. i.e. the first character/field on a line has an index of 1.<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 CutCommand cut(CutOptions options, String delimiter, Range range)
Cut.Interface
cut
in interface Cut.Interface<CutCommand>
options
- options for the cut commanddelimiter
- use as the output delimiter the default is to use the input delimiterrange
- select only these fields<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 CutCommand cut(CutOptions options, String delimiter, int... indexes)
Cut.Interface
cut
in interface Cut.Interface<CutCommand>
options
- options for the cut commanddelimiter
- use as the output delimiter the default is to use the input delimiterindexes
- select these chars/field based on the given indexes. Indexes are 1 based. i.e. the first character/field on a line has an index of 1.<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 CutCommand cut(CutOptions options, String delimiter, char outputDelimiter, Range range)
Cut.Interface
cut
in interface Cut.Interface<CutCommand>
options
- options for the cut commanddelimiter
- use as the output delimiter the default is to use the input delimiteroutputDelimiter
- use as the output delimiter the default is to use the input delimiterrange
- select only these fields<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 CutCommand cut(CutOptions options, String delimiter, char outputDelimiter, int... indexes)
Cut.Interface
cut
in interface Cut.Interface<CutCommand>
options
- options for the cut commanddelimiter
- use as the output delimiter the default is to use the input delimiteroutputDelimiter
- use as the output delimiter the default is to use the input delimiterindexes
- select these chars/field based on the given indexes. Indexes are 1 based. i.e. the first character/field on a line has an index of 1.<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.