org.apache.avalon.excalibur.cli
クラス CLOption

java.lang.Object
  |
  +--org.apache.avalon.excalibur.cli.CLOption

public final class CLOption
extends java.lang.Object

Basic class describing an instance of option.

導入されたバージョン:
4.0
作成者:
Peter Donald

フィールドの概要
static int TEXT_ARGUMENT
          Value of getId() when the option is a text argument.
 
コンストラクタの概要
CLOption(int id)
          Constructor taking an id (that must be a proper character code)
CLOption(java.lang.String argument)
          Constructor taking argument for option.
 
メソッドの概要
 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.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

TEXT_ARGUMENT

public static final int TEXT_ARGUMENT
Value of getId() when the option is a text argument.
コンストラクタの詳細

CLOption

public CLOption(int id)
Constructor taking an id (that must be a proper character code)
パラメータ:
id - the new id

CLOption

public CLOption(java.lang.String argument)
Constructor taking argument for option.
パラメータ:
argument - the argument
メソッドの詳細

getArgument

public final java.lang.String getArgument()
Retrieve argument to option if it takes arguments.
戻り値:
the (first) argument

getArgument

public final java.lang.String getArgument(int index)
Retrieve indexed argument to option if it takes arguments.
パラメータ:
index - The argument index, from 0 to getArgumentCount()-1.
戻り値:
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.
戻り値:
the id

addArgument

public final void addArgument(java.lang.String argument)
Mutator of Argument property.
パラメータ:
argument - the argument

getArgumentCount

public final int getArgumentCount()
Get number of arguments.

toString

public final java.lang.String toString()
Convert to String.
オーバーライド:
クラス java.lang.Object 内の toString
戻り値:
the string value


"Copyright ? 2001 Apache Jakarta Project. All Rights Reserved."