org.apache.avalon.excalibur.cli
Class CLOption
java.lang.Object
|
+--org.apache.avalon.excalibur.cli.CLOption
- public class CLOption
- extends java.lang.Object
Basic class describing an instance of option.
- Author:
- Peter Donald
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 fo Argument property. |
java.lang.String |
getArgument()
Retrieve argument to option if it takes arguments. |
java.lang.String |
getArgument(int index)
Retrieve argument to option if it takes arguments. |
int |
getArgumentCount()
|
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 |
m_id
protected final int m_id
m_arguments
protected java.lang.String[] m_arguments
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
getArgument
public final java.lang.String getArgument()
- Retrieve argument to option if it takes arguments.
- Returns:
- the argument
getArgument
public final java.lang.String getArgument(int index)
- Retrieve argument to option if it takes arguments.
- Returns:
- the argument
getId
public final int getId()
- Retrieve id of option.
The id is eqivelent to character code if it can be a single letter option.
- Returns:
- the id
addArgument
public final void addArgument(java.lang.String argument)
- Mutator fo Argument property.
- Parameters:
argument
- the argument
getArgumentCount
public int getArgumentCount()
toString
public java.lang.String toString()
- Convert to String.
- Overrides:
toString
in class java.lang.Object
- Returns:
- the string value
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.