org.gersteinlab.act.util
Class Config

java.lang.Object
  extended by org.gersteinlab.act.util.Config

public class Config
extends java.lang.Object

        This class defines a set of configurations. It is similar to
        java.util.Properties, but the order of the configurations is maintained.
        Also, if the same name is shared by multiple entries, all the entries
        will be stored and associated with the name.
        


Constructor Summary
Config(java.io.File configFile)
          Create a new configuration set by reading from a configuration file.
 
Method Summary
 java.lang.String getConfig(java.lang.String configName)
          Get the value a certain configuration.
 java.util.Set<java.lang.String> getConfigNames()
          Get the names of the configurations.
 java.util.List<java.lang.String> getConfigs(java.lang.String configName)
          Get the values of a certain configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Config

public Config(java.io.File configFile)
       throws java.io.IOException
Create a new configuration set by reading from a configuration file.

Parameters:
configFile - The configuration file
Throws:
java.io.IOException
Method Detail

getConfigs

public java.util.List<java.lang.String> getConfigs(java.lang.String configName)
Get the values of a certain configuration.

Parameters:
configName - The name of the configuration
Returns:
The values,
null if there is no such entry

getConfig

public java.lang.String getConfig(java.lang.String configName)
Get the value a certain configuration. If there are multiple values, the first one will be returned.

Parameters:
configName - The name of the configuration
Returns:
The value,
null if there is no such entry

getConfigNames

public java.util.Set<java.lang.String> getConfigNames()
Get the names of the configurations.

Returns:
The names