org.apache.axis.utils
Class CLOption

java.lang.Object
  |
  +--org.apache.axis.utils.CLOption

public final class CLOption
extends java.lang.Object

Basic class describing an instance of option.

Since:
4.0
Author:
Peter Donald

Field Summary
static int TEXT_ARGUMENT
          Value of 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(java.lang.String argument)
          Constructor taking argument for option.
 
Method Summary
 void addArgument(java.lang.String argument)
          Mutator of Argument property.
 java.lang.String getArgument()
          Retrieve argument to option if it takes arguments.
 java.lang.String getArgument(int index)
          Retrieve indexed argument to option if it takes arguments.
 int getArgumentCount()
          Get number of arguments.
 int getId()
          Retrieve id of option.
 java.lang.String toString()
          Convert to String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TEXT_ARGUMENT

public static final int TEXT_ARGUMENT
Value of getId() when the option is a text argument.

See Also:
Constant Field Values
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(java.lang.String argument)
Constructor taking argument for option.

Parameters:
argument - the argument
Method Detail

getArgument

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

Returns:
the (first) argument

getArgument

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

Parameters:
index - The argument index, from 0 to getArgumentCount()-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

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

Parameters:
argument - the argument

getArgumentCount

public final int getArgumentCount()
Get number of arguments.


toString

public final java.lang.String toString()
Convert to String.

Overrides:
toString in class java.lang.Object
Returns:
the string value


Copyright © 2003 Apache Web Services Project. All Rights Reserved.