com.ptc.windchill.upgrade.tool
Class ArgumentProcessor.ProcessedArguments

java.lang.Object
  extended bycom.ptc.windchill.upgrade.tool.ArgumentProcessor.ProcessedArguments
Enclosing class:
ArgumentProcessor

public static final class ArgumentProcessor.ProcessedArguments
extends Object

Inner class that stores the arguments, under the correct category. If there is a match to an argument it is processed and is classified as an option. If there is no match the argument's classification remains as an argument.


Field Summary
private  ArrayList arguments_
           
private  HashMap options_
           
 
Constructor Summary
private ArgumentProcessor.ProcessedArguments()
           
 
Method Summary
private  void addArgument(String arg)
          When argument(s) provided by the user does not match any of the values in the option list.
 String[] getArguments()
          Retrieves the values of arguments that were entered and were not stored as an option.
 Object getOption(String opt_name)
          Retrieves the value of the specified option.
 String[] getSelectedOptionNames()
          Retrieves all the values that are options.
 boolean isOptionSet(String opt_name)
          Checks if the argument with the specified name is an option.
private  void setOption(String opt_name, Object opt_value)
          The argument(s) provided by the user matches the values in the option list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

arguments_

private ArrayList arguments_

options_

private HashMap options_
Constructor Detail

ArgumentProcessor.ProcessedArguments

private ArgumentProcessor.ProcessedArguments()
Method Detail

addArgument

private void addArgument(String arg)
When argument(s) provided by the user does not match any of the values in the option list. It is stored and classified as a command not to execute.


setOption

private void setOption(String opt_name,
                       Object opt_value)
The argument(s) provided by the user matches the values in the option list. Stores the option and argument it requires.


getArguments

public String[] getArguments()
Retrieves the values of arguments that were entered and were not stored as an option.

Returns:
will never be null, could be empty list

getOption

public Object getOption(String opt_name)
Retrieves the value of the specified option.

Returns:
can be null

isOptionSet

public boolean isOptionSet(String opt_name)
Checks if the argument with the specified name is an option.


getSelectedOptionNames

public String[] getSelectedOptionNames()
Retrieves all the values that are options.

Returns:
can be empty list