|
ritopt API Documentation by Damian Eads |
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--gnu.dtools.ritopt.Option
|
+--gnu.dtools.ritopt.ShortOption
This class is used for options with short values.
Copyright (C) Damian Ryan Eads, 2001. All Rights Reserved. ritopt is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ritopt is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ritopt; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
| Constructor Summary | |
ShortOption()
Constructs a short option that is initially set to zero. |
|
ShortOption(short value)
Constructs a short option initialized with the value passed. |
|
ShortOption(short value,
char shortOption)
Constructs a character option initialized with the value and short option passed. |
|
ShortOption(ShortOption op)
Constructs a short option by copying the short option passed. |
|
ShortOption(short value,
java.lang.String longOption)
Constructs a short option initialized with the value and long option passed. |
|
ShortOption(short value,
java.lang.String longOption,
char shortOption)
Constructs a short option initialized with the value, short and long option passed. |
|
| Method Summary | |
java.lang.Object |
getObject()
Return the value as an object. |
java.lang.String |
getStringValue()
Return this option as a string. |
java.lang.String |
getTypeName()
Returns the type name of this option. |
short |
getValue()
Return this option as a short. |
void |
modify(java.lang.String value)
Modify this option based on a string representation. |
void |
setValue(short value)
Modify this option using a short value. |
void |
setValue(java.lang.String value)
Modify this option based on a string representation. |
java.lang.String |
toString()
Returns a string representation of this object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ShortOption()
public ShortOption(ShortOption op)
op - The character option to copy.public ShortOption(short value)
value - The initial value of this short option.
public ShortOption(short value,
java.lang.String longOption)
value - The initial value of this short option.longOption - The long option associated with short option.
public ShortOption(short value,
char shortOption)
value - The initial value of this short option.shortOption - The short option associated with this option.
public ShortOption(short value,
java.lang.String longOption,
char shortOption)
shortOption - The short option associated with this option.longOption - The long option associated with this option.value - The initial value of this short option.| Method Detail |
public java.lang.Object getObject()
getObject in class Option
public void modify(java.lang.String value)
throws OptionModificationException
value - String representation of the object.OptionModificationException - Thrown if an error occurs
during modification of an option.
public void setValue(java.lang.String value)
throws OptionModificationException
value - String representation of the object.OptionModificationException - Thrown if an error occurs
during modification of an option.public void setValue(short value)
value - A short value.public short getValue()
public java.lang.String getStringValue()
getStringValue in class Optionpublic java.lang.String getTypeName()
getTypeName in class Optionpublic java.lang.String toString()
toString in class java.lang.Object
|
Copyright (C) Damian Ryan Eads, 2001. All Rights Reserved. |
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||