public enum CutOptionSet_cf extends Enum<CutOptionSet_cf> implements CutOptions
cut
command with
the following options: c
, f
.
Application code does normally not directly refer to this class;
Cut.Options
should be used instead to specify command
options. See also CutOptions
for more information.
CutOptions.Default
Enum Constant and Description |
---|
Active_c
Option set with the following active options:
c . |
Active_c_long
Option set with the following active options:
c . |
Active_cf
|
Active_cf_long
|
Active_f
Option set with the following active options:
f . |
Active_f_long
Option set with the following active options:
f . |
Modifier and Type | Field and Description |
---|---|
CutOptionSet_cf |
c
Option
"-c" : The list specifies character positions. |
CutOptionSet_cf |
chars
Option
"--chars" : The list specifies character positions. |
CutOptionSet_cf |
f
Option
"-f" : The list specifies fields, separated in the input by the field
delimiter character (see the -d option.) Output fields are
separated by a single occurrence of the field delimiter character. |
CutOptionSet_cf |
fields
Option
"--fields" : The list specifies fields, separated in the input by the field
delimiter character (see the -d option.) Output fields are
separated by a single occurrence of the field delimiter character. |
CONVERTER, EMPTY
Modifier and Type | Method and Description |
---|---|
EnumSet<CutOption> |
asSet()
Returns the set with the active options.
|
boolean |
isSet(CutOption option)
Returns true if the specified
option is set and false otherwise |
Iterator<CutOption> |
iterator()
Returns an immutable iterator with the active options of this option set.
|
Class<CutOption> |
optionType()
Returns the option type class, usually an enum.
|
int |
size()
Returns the number of active options in this option set.
|
boolean |
useAcronymFor(CutOption option)
Returns true if the
acronym should be used in
for the specified option string representations. |
static CutOptionSet_cf |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CutOptionSet_cf[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
forEach, spliterator
public static final CutOptionSet_cf Active_cf
public static final CutOptionSet_cf Active_cf_long
public static final CutOptionSet_cf Active_c
c
.public static final CutOptionSet_cf Active_c_long
c
.public static final CutOptionSet_cf Active_f
f
.public static final CutOptionSet_cf Active_f_long
f
.public final CutOptionSet_cf c
"-c"
: The list specifies character positions.
The option "-c"
is equivalent to the "--
chars
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "-c"
. If the option "-c"
is already set, the field c
points to the enum constant itself
as it already represents the current set of options.
public final CutOptionSet_cf chars
"--chars"
: The list specifies character positions.
The option "--chars"
is equivalent to the "-
c
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "--chars"
. If the option "--chars"
is already set, the field chars
points to the enum constant itself
as it already represents the current set of options.
public final CutOptionSet_cf f
"-f"
: The list specifies fields, separated in the input by the field
delimiter character (see the -d option.) Output fields are
separated by a single occurrence of the field delimiter character.
The option "-f"
is equivalent to the "--
fields
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "-f"
. If the option "-f"
is already set, the field f
points to the enum constant itself
as it already represents the current set of options.
public final CutOptionSet_cf fields
"--fields"
: The list specifies fields, separated in the input by the field
delimiter character (see the -d option.) Output fields are
separated by a single occurrence of the field delimiter character.
The option "--fields"
is equivalent to the "-
f
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "--fields"
. If the option "--fields"
is already set, the field fields
points to the enum constant itself
as it already represents the current set of options.
public static CutOptionSet_cf[] values()
for (CutOptionSet_cf c : CutOptionSet_cf.values()) System.out.println(c);
public static CutOptionSet_cf valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Class<CutOption> optionType()
OptionSet
optionType
in interface OptionSet<CutOption>
public boolean isSet(CutOption option)
OptionSet
option
is set and false otherwisepublic int size()
OptionSet
public EnumSet<CutOption> asSet()
this
option set.public Iterator<CutOption> iterator()
public boolean useAcronymFor(CutOption option)
acronym
should be used in
for the specified option
string representations.
In particular and independent from the option
argument, this
option set returns true if the last option added to this set was an
acronym, and false if it was a long option name.
For instance, the set defined as
CutOptionSet_cf.chars.f;uses acronyms, that is, this method always returns true for the above set.
On the other hand, long option names are used and this method always returns false for the set
CutOptionSet_cf.c.fields;
Note that a repeated option is not treated as the last set option. For instance, the first and last option of the following set are equivalent and acronyms are used:
CutOptionSet_cf.c.f.chars;
This method always returns true for the empty set with no active options.
useAcronymFor
in interface OptionSet<CutOption>
option
- the option of interest, has no impact on the result returned
by this methodCopyright © 2024. All rights reserved.