|
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.OptionEvent
An event indicating that an option has been invoked. When an OptionListener is notified by a NotifyOption, it passes an OptionEvent object to all registered listeners. This includes the target NotifyOption, a command (NotifyOption passes the long option by default), and the option value.
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 | |
OptionEvent()
Constructs an option event with the command set to "Default", the value set to the empty string, and the target set to null. |
|
OptionEvent(Option option)
Constructs an option event with the command set to the long or short option (whichever exists), the value set to the current value of the option, and the target option set to the option passed. |
|
OptionEvent(java.lang.String command)
Constructs an option event with the command set to the value passed, the value set to the empty string, and the target set to null. |
|
OptionEvent(java.lang.String command,
java.lang.String value)
Constructs an option event with the command and value set to the values passed, and the target set to null. |
|
OptionEvent(java.lang.String command,
java.lang.String value,
Option target)
Constructs an option event with the command, value, and target set to the values passed. |
|
| Method Summary | |
java.lang.String |
getCommand()
Returns the command string associated with the option. |
Option |
getTarget()
Returns the target option of the option processing event. |
java.lang.String |
getValue()
Returns the value associated with the target option. |
void |
setCommand(java.lang.String command)
Sets the command string to the value passed. |
void |
setTarget(Option target)
Sets the target option of the option processing event. |
void |
setValue(java.lang.String value)
Sets the value of this option event. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public OptionEvent()
public OptionEvent(java.lang.String command)
command - The value to set the command string.
public OptionEvent(java.lang.String command,
java.lang.String value)
command - The value to set the command string.value - The value to set the option value.public OptionEvent(Option option)
option - The option to initialize this OptionEvent.
public OptionEvent(java.lang.String command,
java.lang.String value,
Option target)
command - The value to set the command string.value - The value to set the option value.target - The target option in which the option processing
event occurred.| Method Detail |
public java.lang.String getCommand()
public java.lang.String getValue()
public Option getTarget()
public void setCommand(java.lang.String command)
command - The value to set the command string.public void setValue(java.lang.String value)
value - The value of the option event.public void setTarget(Option target)
target - The target option.
|
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 | ||||||