org.virion.jam.app
Class Arguments

java.lang.Object
  extended by org.virion.jam.app.Arguments

public class Arguments
extends Object


Nested Class Summary
static class Arguments.ArgumentException
           
static class Arguments.IntegerArrayOption
           
static class Arguments.IntegerOption
           
static class Arguments.Option
           
static class Arguments.RealArrayOption
           
static class Arguments.RealOption
           
static class Arguments.StringOption
           
 
Field Summary
static String ARGUMENT_CHARACTER
           
 
Constructor Summary
Arguments(Arguments.Option[] options)
          Parse a list of arguments ready for accessing
Arguments(Arguments.Option[] options, boolean caseSensitive)
           
 
Method Summary
 int[] getIntegerArrayOption(String label)
          Return the value of an integer array option
 int getIntegerOption(String label)
          Return the value of an integer option
 String[] getLeftoverArguments()
          Return any arguments leftover after the options
 double[] getRealArrayOption(String label)
          Return the value of an real array option
 double getRealOption(String label)
          Return the value of an real number option
 String getStringOption(String label)
          Return the value of an string option
 boolean hasOption(String label)
          Does an argument with label exist?
 void parseArguments(String[] arguments)
          Parse a list of arguments ready for accessing
 void printUsage(String name, String commandLine)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARGUMENT_CHARACTER

public static final String ARGUMENT_CHARACTER
See Also:
Constant Field Values
Constructor Detail

Arguments

public Arguments(Arguments.Option[] options)
Parse a list of arguments ready for accessing


Arguments

public Arguments(Arguments.Option[] options,
                 boolean caseSensitive)
Method Detail

parseArguments

public void parseArguments(String[] arguments)
                    throws Arguments.ArgumentException
Parse a list of arguments ready for accessing

Throws:
Arguments.ArgumentException

hasOption

public boolean hasOption(String label)
Does an argument with label exist?


getIntegerOption

public int getIntegerOption(String label)
Return the value of an integer option


getIntegerArrayOption

public int[] getIntegerArrayOption(String label)
Return the value of an integer array option


getRealOption

public double getRealOption(String label)
Return the value of an real number option


getRealArrayOption

public double[] getRealArrayOption(String label)
Return the value of an real array option


getStringOption

public String getStringOption(String label)
Return the value of an string option


getLeftoverArguments

public String[] getLeftoverArguments()
Return any arguments leftover after the options


printUsage

public void printUsage(String name,
                       String commandLine)