Package org.apache.axis.utils
Class CLOption
java.lang.Object
org.apache.axis.utils.CLOption
Basic class describing an instance of option.
- Since:
- 4.0
- Author:
- Peter Donald
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Value ofgetId()
when the option is a text argument. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addArgument
(String argument) Mutator of Argument property.final String
Retrieve argument to option if it takes arguments.final String
getArgument
(int index) Retrieve indexed argument to option if it takes arguments.final int
Get number of arguments.final int
getId()
Retrieve id of option.final String
toString()
Convert to String.
-
Field Details
-
TEXT_ARGUMENT
public static final int TEXT_ARGUMENTValue ofgetId()
when the option is a text argument.- See Also:
-
-
Constructor Details
-
CLOption
public CLOption(int id) Constructor taking an id (that must be a proper character code)- Parameters:
id
- the new id
-
CLOption
Constructor taking argument for option.- Parameters:
argument
- the argument
-
-
Method Details
-
getArgument
Retrieve argument to option if it takes arguments.- Returns:
- the (first) argument
-
getArgument
Retrieve indexed argument to option if it takes arguments.- Parameters:
index
- The argument index, from 0 togetArgumentCount()
-1.- Returns:
- the argument
-
getId
public final int getId()Retrieve id of option. The id is eqivalent to character code if it can be a single letter option.- Returns:
- the id
-
addArgument
Mutator of Argument property.- Parameters:
argument
- the argument
-
getArgumentCount
public final int getArgumentCount()Get number of arguments. -
toString
Convert to String.
-