net.sourceforge.openstego.util
Class CmdLineOptions

java.lang.Object
  extended bynet.sourceforge.openstego.util.CmdLineOptions

public class CmdLineOptions
extends Object

Class to store the list of command line options


Constructor Summary
CmdLineOptions()
           
 
Method Summary
 void add(CmdLineOption option)
          Method to add the command-line option
 void add(String name, String altName, int type, boolean takesArg)
          Overloaded method to add the command-line option
 List getList()
          Method to get the list of the given options
 CmdLineOption getOption(int index)
          Method to get the standard option data by index
 CmdLineOption getOption(String name)
          Method to get the standard option data by name
 String getOptionValue(String name)
          Method to get the value of the given option
 int size()
          Method to get the number of the given options
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmdLineOptions

public CmdLineOptions()
Method Detail

add

public void add(CmdLineOption option)
Method to add the command-line option

Parameters:
option - Command-line option

add

public void add(String name,
                String altName,
                int type,
                boolean takesArg)
Overloaded method to add the command-line option

Parameters:
name - Name of the option
altName - Alternate name of the option
type - Type of the option
takesArg - Flag to indicate whether the option takes argument or not

getOption

public CmdLineOption getOption(String name)
Method to get the standard option data by name

Parameters:
name - Name of the option
Returns:
Command-line option

getOption

public CmdLineOption getOption(int index)
Method to get the standard option data by index

Parameters:
index - Index of the option
Returns:
Command-line option

getOptionValue

public String getOptionValue(String name)
Method to get the value of the given option

Parameters:
name - Name of the option
Returns:
Value of the command-line option

getList

public List getList()
Method to get the list of the given options

Returns:
List of options

size

public int size()
Method to get the number of the given options

Returns:
Number of options


Copyright © 2007-2008 Samir Vaidya. All Rights Reserved.