public enum UniqOptionSet_cdgu extends Enum<UniqOptionSet_cdgu> implements UniqOptions
uniq
command with
the following options: c
, d
, g
, u
.
Application code does normally not directly refer to this class;
Uniq.Options
should be used instead to specify command
options. See also UniqOptions
for more information.
UniqOptions.Default
Enum Constant and Description |
---|
Active_g
Option set with the following active options:
g . |
Active_g_long
Option set with the following active options:
g . |
Modifier and Type | Field and Description |
---|---|
UniqOptionSet_cg |
c
Option
"-c" : Precedes each output line with a count of the number of times the
line occurred in the input. |
UniqOptionSet_cg |
count
Option
"--count" : Precedes each output line with a count of the number of times the
line occurred in the input. |
UniqOptionSet_dg |
d
Option
"-d" : Suppresses the writing of lines that are not repeated in the input. |
UniqOptionSet_dg |
duplicatedOnly
Option
"--duplicatedOnly" : Suppresses the writing of lines that are not repeated in the input. |
UniqOptionSet_cdgu |
g
Option
"-g" : Suppresses repeated lines globally, that is, if lines are
non-adjacent. |
UniqOptionSet_cdgu |
global
Option
"--global" : Suppresses repeated lines globally, that is, if lines are
non-adjacent. |
UniqOptionSet_gu |
u
Option
"-u" : Suppresses the writing of lines that are repeated in the input. |
UniqOptionSet_gu |
uniqueOnly
Option
"--uniqueOnly" : Suppresses the writing of lines that are repeated in the input. |
CONVERTER, EMPTY
Modifier and Type | Method and Description |
---|---|
EnumSet<UniqOption> |
asSet()
Returns the set with the active options.
|
boolean |
isSet(UniqOption option)
Returns true if the specified
option is set and false otherwise |
Iterator<UniqOption> |
iterator()
Returns an immutable iterator with the active options of this option set.
|
Class<UniqOption> |
optionType()
Returns the option type class, usually an enum.
|
int |
size()
Returns the number of active options in this option set.
|
boolean |
useAcronymFor(UniqOption option)
Returns true if the
acronym should be used in
for the specified option string representations. |
static UniqOptionSet_cdgu |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static UniqOptionSet_cdgu[] |
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 UniqOptionSet_cdgu Active_g
g
.public static final UniqOptionSet_cdgu Active_g_long
g
.public final UniqOptionSet_cg c
"-c"
: Precedes each output line with a count of the number of times the
line occurred in the input.
The option "-c"
is equivalent to the "--
count
"
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 UniqOptionSet_cg count
"--count"
: Precedes each output line with a count of the number of times the
line occurred in the input.
The option "--count"
is equivalent to the "-
c
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "--count"
. If the option "--count"
is already set, the field count
points to the enum constant itself
as it already represents the current set of options.
public final UniqOptionSet_dg d
"-d"
: Suppresses the writing of lines that are not repeated in the input.
The option "-d"
is equivalent to the "--
duplicatedOnly
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "-d"
. If the option "-d"
is already set, the field d
points to the enum constant itself
as it already represents the current set of options.
public final UniqOptionSet_dg duplicatedOnly
"--duplicatedOnly"
: Suppresses the writing of lines that are not repeated in the input.
The option "--duplicatedOnly"
is equivalent to the "-
d
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "--duplicatedOnly"
. If the option "--duplicatedOnly"
is already set, the field duplicatedOnly
points to the enum constant itself
as it already represents the current set of options.
public final UniqOptionSet_cdgu g
"-g"
: Suppresses repeated lines globally, that is, if lines are
non-adjacent. This option guarantees unique output lines even if the
input lines are not sorted.
The option "-g"
is equivalent to the "--
global
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "-g"
. If the option "-g"
is already set, the field g
points to the enum constant itself
as it already represents the current set of options.
public final UniqOptionSet_cdgu global
"--global"
: Suppresses repeated lines globally, that is, if lines are
non-adjacent. This option guarantees unique output lines even if the
input lines are not sorted.
The option "--global"
is equivalent to the "-
g
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "--global"
. If the option "--global"
is already set, the field global
points to the enum constant itself
as it already represents the current set of options.
public final UniqOptionSet_gu u
"-u"
: Suppresses the writing of lines that are repeated in the input.
The option "-u"
is equivalent to the "--
uniqueOnly
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "-u"
. If the option "-u"
is already set, the field u
points to the enum constant itself
as it already represents the current set of options.
public final UniqOptionSet_gu uniqueOnly
"--uniqueOnly"
: Suppresses the writing of lines that are repeated in the input.
The option "--uniqueOnly"
is equivalent to the "-
u
"
option.
Technically speaking, this field points to a set with the options of the
current set plus the option "--uniqueOnly"
. If the option "--uniqueOnly"
is already set, the field uniqueOnly
points to the enum constant itself
as it already represents the current set of options.
public static UniqOptionSet_cdgu[] values()
for (UniqOptionSet_cdgu c : UniqOptionSet_cdgu.values()) System.out.println(c);
public static UniqOptionSet_cdgu 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<UniqOption> optionType()
OptionSet
optionType
in interface OptionSet<UniqOption>
public boolean isSet(UniqOption option)
OptionSet
option
is set and false otherwiseisSet
in interface OptionSet<UniqOption>
option
- the option to testoption
is set in this OptionSet
public int size()
OptionSet
size
in interface OptionSet<UniqOption>
public EnumSet<UniqOption> asSet()
this
option set.asSet
in interface OptionSet<UniqOption>
public Iterator<UniqOption> iterator()
iterator
in interface Iterable<UniqOption>
iterator
in interface OptionSet<UniqOption>
public boolean useAcronymFor(UniqOption 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
UniqOptionSet_cdgu.count.d;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
UniqOptionSet_cdgu.c.duplicatedOnly;
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:
UniqOptionSet_cdgu.c.d.count;
This method always returns true for the empty set with no active options.
useAcronymFor
in interface OptionSet<UniqOption>
option
- the option of interest, has no impact on the result returned
by this methodCopyright © 2024. All rights reserved.