public class OptionEvent
extends java.lang.Object
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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.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.