public class BooleanOption extends Object implements CmdLineOption
BooleanOption
class models a command line
option that is either present (true) or not present (false).
Includes options like: -hello
, -e
,
and -a
. Here, the option keys are "hello",
"e", and "a", respectively.OptionParser
Modifier and Type | Field and Description |
---|---|
boolean |
value
true iff option is present on command line.
|
Constructor and Description |
---|
BooleanOption(String key)
Creates a new boolean option.
|
Modifier and Type | Method and Description |
---|---|
String |
getKey()
Returns the string that the
OptionParser seeks
on the command line in association with the CmdLineOption . |
public String getKey()
CmdLineOption
OptionParser
seeks
on the command line in association with the CmdLineOption
.
Initial '-' not included.getKey
in interface CmdLineOption
OptionParser
Copyright © 2023. All rights reserved.