public enum CatOptionSet_bs extends Enum<CatOptionSet_bs> implements CatOptions
cat
command with
the following options: b
, s
.
Application code does normally not directly refer to this class;
Cat.Options
should be used instead to specify command
options. See also CatOptions
for more information.
CatOptions.Default
Enum Constant and Description |
---|
Active_b
Option set with the following active options:
b . |
Active_b_long
Option set with the following active options:
b . |
Active_bs
|
Active_bs_long
|
Modifier and Type | Field and Description |
---|---|
CatOptionSet_bs |
b
Option
"-b" : Number the non-blank output lines, starting at 1. |
CatOptionSet_bs |
numberNonBlankLines
Option
"--numberNonBlankLines" : Number the non-blank output lines, starting at 1. |
CatOptionSet_bs |
s
Option
"-s" : Squeeze multiple adjacent empty lines, causing the output to be
single spaced. |
CatOptionSet_bs |
squeezeEmptyLines
Option
"--squeezeEmptyLines" : Squeeze multiple adjacent empty lines, causing the output to be
single spaced. |
CONVERTER, EMPTY
Modifier and Type | Method and Description |
---|---|
EnumSet<CatOption> |
asSet()
Returns the set with the active options.
|
boolean |
isSet(CatOption option)
Returns true if the specified
option is set and false otherwise |
Iterator<CatOption> |
iterator()
Returns an immutable iterator with the active options of this option set.
|
Class<CatOption> |
optionType()
Returns the option type class, usually an enum.
|
int |
size()
Returns the number of active options in this option set.
|
boolean |
useAcronymFor(CatOption option)
Returns true if the
acronym should be used in
for the specified option string representations. |
static CatOptionSet_bs |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CatOptionSet_bs[] |
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 CatOptionSet_bs Active_bs
public static final CatOptionSet_bs Active_bs_long
public static final CatOptionSet_bs Active_b
b
.public static final CatOptionSet_bs Active_b_long
b
.public final CatOptionSet_bs b
"-b"
: Number the non-blank output lines, starting at 1.
The option "-b"
is equivalent to the "--
numberNonBlankLines
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "-b"
. If the option "-b"
is already set, the field b
points to the enum constant itself
as it already represents the current set of options.
public final CatOptionSet_bs numberNonBlankLines
"--numberNonBlankLines"
: Number the non-blank output lines, starting at 1.
The option "--numberNonBlankLines"
is equivalent to the "-
b
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "--numberNonBlankLines"
. If the option "--numberNonBlankLines"
is already set, the field numberNonBlankLines
points to the enum constant itself
as it already represents the current set of options.
public final CatOptionSet_bs s
"-s"
: Squeeze multiple adjacent empty lines, causing the output to be
single spaced.
The option "-s"
is equivalent to the "--
squeezeEmptyLines
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "-s"
. If the option "-s"
is already set, the field s
points to the enum constant itself
as it already represents the current set of options.
public final CatOptionSet_bs squeezeEmptyLines
"--squeezeEmptyLines"
: Squeeze multiple adjacent empty lines, causing the output to be
single spaced.
The option "--squeezeEmptyLines"
is equivalent to the "-
s
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "--squeezeEmptyLines"
. If the option "--squeezeEmptyLines"
is already set, the field squeezeEmptyLines
points to the enum constant itself
as it already represents the current set of options.
public static CatOptionSet_bs[] values()
for (CatOptionSet_bs c : CatOptionSet_bs.values()) System.out.println(c);
public static CatOptionSet_bs 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<CatOption> optionType()
OptionSet
optionType
in interface OptionSet<CatOption>
public boolean isSet(CatOption option)
OptionSet
option
is set and false otherwisepublic int size()
OptionSet
public EnumSet<CatOption> asSet()
this
option set.public Iterator<CatOption> iterator()
public boolean useAcronymFor(CatOption 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
CatOptionSet_bs.numberNonBlankLines.s;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
CatOptionSet_bs.b.squeezeEmptyLines;
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:
CatOptionSet_bs.b.s.numberNonBlankLines;
This method always returns true for the empty set with no active options.
useAcronymFor
in interface OptionSet<CatOption>
option
- the option of interest, has no impact on the result returned
by this methodCopyright © 2024. All rights reserved.