|
|||||||||
| Home >> All >> gnu >> dtools >> [ ritopt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
gnu.dtools.ritopt
Class StringOption

java.lang.Objectgnu.dtools.ritopt.Option
gnu.dtools.ritopt.StringOption
- All Implemented Interfaces:
- OptionModifiable
- public class StringOption
- extends Option
This class is used for options with String 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
| Field Summary | |
private java.lang.String |
value
The value of this string option. |
| Constructor Summary | |
StringOption()
Constructs a string option that is initially set to zero. |
|
StringOption(java.lang.String value)
Constructs a string option initialized with the value passed. |
|
StringOption(java.lang.String value,
char shortOption)
Constructs a character option initialized with the value and short option passed. |
|
StringOption(StringOption op)
Constructs a string option by copying the string option passed. |
|
StringOption(java.lang.String value,
java.lang.String longOption)
Constructs a string option initialized with the value and long option passed. |
|
StringOption(java.lang.String value,
java.lang.String longOption,
char shortOption)
Constructs a string 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. |
java.lang.String |
getValue()
Modify this option using a string value. |
void |
modify(java.lang.String value)
Modify this option based on a string representation. |
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 |
| Field Detail |
value
private java.lang.String value
- The value of this string option.
| Constructor Detail |
StringOption
public StringOption()
- Constructs a string option that is initially set to zero.
StringOption
public StringOption(StringOption op)
- Constructs a string option by copying the string option passed.
StringOption
public StringOption(java.lang.String value)
- Constructs a string option initialized with the value passed.
StringOption
public StringOption(java.lang.String value, java.lang.String longOption)
- Constructs a string option initialized with the value and
long option passed.
StringOption
public StringOption(java.lang.String value, char shortOption)
- Constructs a character option initialized with the value and
short option passed.
StringOption
public StringOption(java.lang.String value, java.lang.String longOption, char shortOption)
- Constructs a string option initialized with the value, short
and long option passed.
| Method Detail |
getObject
public java.lang.Object getObject()
modify
public void modify(java.lang.String value) throws OptionModificationException
- Modify this option based on a string representation.
setValue
public void setValue(java.lang.String value) throws OptionModificationException
- Modify this option based on a string representation.
getValue
public java.lang.String getValue()
- Modify this option using a string value.
getStringValue
public java.lang.String getStringValue()
- Return this option as a string.
- Specified by:
getStringValuein classOption
getTypeName
public java.lang.String getTypeName()
- Returns the type name of this option. For an StringOption, "STRING"
is returned.
- Specified by:
getTypeNamein classOption
toString
public java.lang.String toString()
- Returns a string representation of this object.
|
|||||||||
| Home >> All >> gnu >> dtools >> [ ritopt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC