public final class CLOption extends Object
Modifier and Type | Field and Description |
---|---|
static int |
TEXT_ARGUMENT
Value of
CLOptionDescriptor.getId() when the option is a text argument. |
Constructor and Description |
---|
CLOption(CLOptionDescriptor descriptor)
Constructor taking an descriptor
|
CLOption(String argument)
Constructor taking argument for option.
|
Modifier and Type | Method and Description |
---|---|
void |
addArgument(String argument)
Mutator of Argument property.
|
String |
getArgument()
Retrieve argument to option if it takes arguments.
|
String |
getArgument(int index)
Retrieve indexed argument to option if it takes arguments.
|
int |
getArgumentCount()
Get number of arguments.
|
CLOptionDescriptor |
getDescriptor() |
String |
toString()
Convert to String.
|
public static final int TEXT_ARGUMENT
CLOptionDescriptor.getId()
when the option is a text argument.public CLOption(CLOptionDescriptor descriptor)
descriptor
- the descriptor iff null, will default to a "text argument"
descriptor.public CLOption(String argument)
argument
- the argumentpublic final String getArgument()
public final String getArgument(int index)
index
- The argument index, from 0 to getArgumentCount()
-1.public final CLOptionDescriptor getDescriptor()
public final void addArgument(String argument)
argument
- the argumentpublic final int getArgumentCount()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.