org.apache.axis.utils

Class CLOption

public final class CLOption extends Object

Basic class describing an instance of option.

Since: 4.0

Author: Peter Donald

Field Summary
static intTEXT_ARGUMENT
Value of {@link #getId} when the option is a text argument.
Constructor Summary
CLOption(int id)
Constructor taking an id (that must be a proper character code)
CLOption(String argument)
Constructor taking argument for option.
Method Summary
voidaddArgument(String argument)
Mutator of Argument property.
StringgetArgument()
Retrieve argument to option if it takes arguments.
StringgetArgument(int index)
Retrieve indexed argument to option if it takes arguments.
intgetArgumentCount()
Get number of arguments.
intgetId()
Retrieve id of option.
StringtoString()
Convert to String.

Field Detail

TEXT_ARGUMENT

public static final int TEXT_ARGUMENT
Value of {@link #getId} when the option is a text argument.

Constructor Detail

CLOption

public CLOption(int id)
Constructor taking an id (that must be a proper character code)

Parameters: id the new id

CLOption

public CLOption(String argument)
Constructor taking argument for option.

Parameters: argument the argument

Method Detail

addArgument

public final void addArgument(String argument)
Mutator of Argument property.

Parameters: argument the argument

getArgument

public final String getArgument()
Retrieve argument to option if it takes arguments.

Returns: the (first) argument

getArgument

public final String getArgument(int index)
Retrieve indexed argument to option if it takes arguments.

Parameters: index The argument index, from 0 to {@link #getArgumentCount()}-1.

Returns: the argument

getArgumentCount

public final int getArgumentCount()
Get number of arguments.

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

toString

public final String toString()
Convert to String.

Returns: the string value

Copyright B) 2005 Apache Web Services Project. All Rights Reserved.