public enum HeadOptionSet_cq extends Enum<HeadOptionSet_cq> implements HeadOptions
head
command with
the following options: c
, q
.
Application code does normally not directly refer to this class;
Head.Options
should be used instead to specify command
options. See also HeadOptions
for more information.
HeadOptions.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_cq
|
Active_cq_long
|
Active_q
Option set with the following active options:
q . |
Active_q_long
Option set with the following active options:
q . |
Modifier and Type | Field and Description |
---|---|
HeadOptionSet_cq |
c
Option
"-c" : The count argument is in units of characters instead of
lines. |
HeadOptionSet_cq |
chars
Option
"--chars" : The count argument is in units of characters instead of
lines. |
HeadOptionSet_cq |
q
Option
"-q" : Suppresses printing of headers when multiple files are being
examined. |
HeadOptionSet_cq |
suppressHeaders
Option
"--suppressHeaders" : Suppresses printing of headers when multiple files are being
examined. |
CONVERTER, EMPTY
Modifier and Type | Method and Description |
---|---|
EnumSet<HeadOption> |
asSet()
Returns the set with the active options.
|
boolean |
isSet(HeadOption option)
Returns true if the specified
option is set and false otherwise |
Iterator<HeadOption> |
iterator()
Returns an immutable iterator with the active options of this option set.
|
Class<HeadOption> |
optionType()
Returns the option type class, usually an enum.
|
int |
size()
Returns the number of active options in this option set.
|
boolean |
useAcronymFor(HeadOption option)
Returns true if the
acronym should be used in
for the specified option string representations. |
static HeadOptionSet_cq |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HeadOptionSet_cq[] |
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 HeadOptionSet_cq Active_cq
public static final HeadOptionSet_cq Active_cq_long
public static final HeadOptionSet_cq Active_c
c
.public static final HeadOptionSet_cq Active_c_long
c
.public static final HeadOptionSet_cq Active_q
q
.public static final HeadOptionSet_cq Active_q_long
q
.public final HeadOptionSet_cq c
"-c"
: The count
argument is in units of characters instead of
lines. Starts from 1 and includes line ending characters.
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 HeadOptionSet_cq chars
"--chars"
: The count
argument is in units of characters instead of
lines. Starts from 1 and includes line ending characters.
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 HeadOptionSet_cq q
"-q"
: Suppresses printing of headers when multiple files are being
examined.
The option "-q"
is equivalent to the "--
suppressHeaders
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "-q"
. If the option "-q"
is already set, the field q
points to the enum constant itself
as it already represents the current set of options.
public final HeadOptionSet_cq suppressHeaders
"--suppressHeaders"
: Suppresses printing of headers when multiple files are being
examined.
The option "--suppressHeaders"
is equivalent to the "-
q
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "--suppressHeaders"
. If the option "--suppressHeaders"
is already set, the field suppressHeaders
points to the enum constant itself
as it already represents the current set of options.
public static HeadOptionSet_cq[] values()
for (HeadOptionSet_cq c : HeadOptionSet_cq.values()) System.out.println(c);
public static HeadOptionSet_cq 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<HeadOption> optionType()
OptionSet
optionType
in interface OptionSet<HeadOption>
public boolean isSet(HeadOption option)
OptionSet
option
is set and false otherwiseisSet
in interface OptionSet<HeadOption>
option
- the option to testoption
is set in this OptionSet
public int size()
OptionSet
size
in interface OptionSet<HeadOption>
public EnumSet<HeadOption> asSet()
this
option set.asSet
in interface OptionSet<HeadOption>
public Iterator<HeadOption> iterator()
iterator
in interface Iterable<HeadOption>
iterator
in interface OptionSet<HeadOption>
public boolean useAcronymFor(HeadOption 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
HeadOptionSet_cq.chars.q;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
HeadOptionSet_cq.c.suppressHeaders;
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:
HeadOptionSet_cq.c.q.chars;
This method always returns true for the empty set with no active options.
useAcronymFor
in interface OptionSet<HeadOption>
option
- the option of interest, has no impact on the result returned
by this methodCopyright © 2024. All rights reserved.