|
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.FloatOption
This class is used for options with float 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 | |
FloatOption()
Constructs a float option that is initially set to zero. |
|
FloatOption(float value)
Constructs a float option initialized with the value passed. |
|
FloatOption(float value,
char shortOption)
Constructs a character option initialized with the value and short option passed. |
|
FloatOption(FloatOption op)
Constructs a float option by copying the float option passed. |
|
FloatOption(float value,
java.lang.String longOption)
Constructs a float option initialized with the value and long option passed. |
|
FloatOption(float value,
java.lang.String longOption,
char shortOption)
Constructs a float 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. |
float |
getValue()
Return this option as a float. |
void |
modify(java.lang.String value)
Modify this option based on a string representation. |
void |
setValue(float value)
Modify this option using a float 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 FloatOption()
public FloatOption(FloatOption op)
op - The character option to copy.public FloatOption(float value)
value - The initial value of this float option.
public FloatOption(float value,
java.lang.String longOption)
value - The initial value of this float option.longOption - The long option associated with float option.
public FloatOption(float value,
char shortOption)
value - The initial value of this float option.shortOption - The short option associated with this option.
public FloatOption(float 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 float 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(float value)
value - A float value.public float 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 | ||||||