public enum UniqOptionSet_dg extends Enum<UniqOptionSet_dg> implements UniqOptions
uniq
command with
the following options: d
, g
.
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_d
Option set with the following active options:
d . |
Active_d_long
Option set with the following active options:
d . |
Active_dg
|
Active_dg_long
|
Modifier and Type | Field and Description |
---|---|
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_dg |
g
Option
"-g" : Suppresses repeated lines globally, that is, if lines are
non-adjacent. |
UniqOptionSet_dg |
global
Option
"--global" : Suppresses repeated lines globally, that is, if lines are
non-adjacent. |
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_dg |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static UniqOptionSet_dg[] |
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_dg Active_dg
public static final UniqOptionSet_dg Active_dg_long
public static final UniqOptionSet_dg Active_d
d
.public static final UniqOptionSet_dg Active_d_long
d
.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_dg 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_dg 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 static UniqOptionSet_dg[] values()
for (UniqOptionSet_dg c : UniqOptionSet_dg.values()) System.out.println(c);
public static UniqOptionSet_dg 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_dg.duplicatedOnly.g;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_dg.d.global;
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_dg.d.g.duplicatedOnly;
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.