astex
Class Arguments

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable
          extended by astex.Arguments
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class Arguments
extends java.util.Hashtable

See Also:
Serialized Form

Constructor Summary
Arguments()
           
 
Method Summary
static java.lang.String addDash(java.lang.String argument)
          Add a dash to the argument if it doesn't exist.
 boolean defined(java.lang.String argument)
          Is this argument defined.
static void ensureConfigurationFileLoaded()
          Make sure we loaded the config file.
 boolean getBoolean(java.lang.String argument, boolean defaultVal)
          Lookup value of String arg or return default.
 int getColor(java.lang.String argument, int defaultVal)
          Return argument interpreted as a color.
 double getDouble(java.lang.String argument, double defaultVal)
          Lookup value of double arg or return default.
 int getInteger(java.lang.String argument, int defaultVal)
          Lookup value of int arg or return default.
 java.lang.String getString(java.lang.String argument, java.lang.String defaultVal)
          Lookup value of String arg or return default.
 int getStringOption(java.lang.String argument, java.lang.String[] possibles, int[] possibleValues, int defaultValue)
          Return lookup of string argument from array of possibles.
static void loadConfigurationFile(java.lang.String filename)
          Load a set of properties from a configuration file.
static java.lang.Object propertyGet(java.lang.String argument)
          Return a property from the builtin file.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Arguments

public Arguments()
Method Detail

addDash

public static java.lang.String addDash(java.lang.String argument)
Add a dash to the argument if it doesn't exist.


defined

public boolean defined(java.lang.String argument)
Is this argument defined.


getDouble

public double getDouble(java.lang.String argument,
                        double defaultVal)
Lookup value of double arg or return default.


getInteger

public int getInteger(java.lang.String argument,
                      int defaultVal)
Lookup value of int arg or return default.


getString

public java.lang.String getString(java.lang.String argument,
                                  java.lang.String defaultVal)
Lookup value of String arg or return default.


getColor

public int getColor(java.lang.String argument,
                    int defaultVal)
Return argument interpreted as a color.


getBoolean

public boolean getBoolean(java.lang.String argument,
                          boolean defaultVal)
Lookup value of String arg or return default.


getStringOption

public int getStringOption(java.lang.String argument,
                           java.lang.String[] possibles,
                           int[] possibleValues,
                           int defaultValue)
Return lookup of string argument from array of possibles.


propertyGet

public static java.lang.Object propertyGet(java.lang.String argument)
Return a property from the builtin file.


ensureConfigurationFileLoaded

public static void ensureConfigurationFileLoaded()
Make sure we loaded the config file.


loadConfigurationFile

public static void loadConfigurationFile(java.lang.String filename)
Load a set of properties from a configuration file.