name.kevinlocke.ultragetopt
Class OptionArgumentPair

java.lang.Object
  extended by name.kevinlocke.ultragetopt.OptionArgumentPair

public class OptionArgumentPair
extends java.lang.Object

Class representing a command-line option and its argument (if any).

Author:
Kevin Locke <kwl7@cornell.edu>

Constructor Summary
OptionArgumentPair(CommandLineOption option, java.lang.String argument)
          Creates a new option-argument pair.
 
Method Summary
 java.lang.String getArgument()
          Gets the argument of the pair.
 CommandLineOption getOption()
          Gets the option of the pair.
 void setArgument(java.lang.String argument)
          Sets the argument.
 void setOption(CommandLineOption option)
          Sets the option.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionArgumentPair

public OptionArgumentPair(CommandLineOption option,
                          java.lang.String argument)
Creates a new option-argument pair.

Parameters:
option - the command-line option
argument - the argument to the command-line option
Method Detail

getArgument

public java.lang.String getArgument()
Gets the argument of the pair.

Returns:
the argument
See Also:
setArgument(String)

setArgument

public void setArgument(java.lang.String argument)
Sets the argument.

Parameters:
argument - the argument to set
See Also:
getArgument()

getOption

public CommandLineOption getOption()
Gets the option of the pair.

Returns:
the option
See Also:
setOption(CommandLineOption)

setOption

public void setOption(CommandLineOption option)
Sets the option.

Parameters:
option - the option to set
See Also:
getOption()