public enum CatOptionSet_bns extends Enum<CatOptionSet_bns> implements CatOptions
cat
command with
the following options: n
, 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_s
Option set with the following active options:
s . |
Active_s_long
Option set with the following active options:
s . |
Modifier and Type | Field and Description |
---|---|
CatOptionSet_bs |
b
Option
"-b" : Number the non-blank output lines, starting at 1. |
CatOptionSet_ns |
n
Option
"-n" : Number the output lines, starting at 1. |
CatOptionSet_ns |
numberLines
Option
"--numberLines" : Number the output lines, starting at 1. |
CatOptionSet_bs |
numberNonBlankLines
Option
"--numberNonBlankLines" : Number the non-blank output lines, starting at 1. |
CatOptionSet_bns |
s
Option
"-s" : Squeeze multiple adjacent empty lines, causing the output to be
single spaced. |
CatOptionSet_bns |
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_bns |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CatOptionSet_bns[] |
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_bns Active_s
s
.public static final CatOptionSet_bns Active_s_long
s
.public final CatOptionSet_ns n
"-n"
: Number the output lines, starting at 1.
The option "-n"
is equivalent to the "--
numberLines
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "-n"
. If the option "-n"
is already set, the field n
points to the enum constant itself
as it already represents the current set of options.
public final CatOptionSet_ns numberLines
"--numberLines"
: Number the output lines, starting at 1.
The option "--numberLines"
is equivalent to the "-
n
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "--numberLines"
. If the option "--numberLines"
is already set, the field numberLines
points to the enum constant itself
as it already represents the current set of options.
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_bns 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_bns 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_bns[] values()
for (CatOptionSet_bns c : CatOptionSet_bns.values()) System.out.println(c);
public static CatOptionSet_bns 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_bns.numberLines.b;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_bns.n.numberNonBlankLines;
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_bns.n.b.numberLines;
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.