uk.ac.roe.antigen.utils
Class Config

java.lang.Object
  extended byuk.ac.roe.antigen.utils.Config

public class Config
extends java.lang.Object

Make Properties globally available by wrapping a Properties with a static class

Author:
jdt

Constructor Summary
Config()
           
 
Method Summary
static java.lang.String getProperty(java.lang.String name)
          Returns null if the property is the empty string
static java.lang.String getProperty(java.lang.String name, java.lang.String defolt)
          Returns the property from the props file, or the default if the property is null or the empty string
static void load(java.lang.String path)
           
static void setProperty(java.lang.String key, java.lang.String value)
          Add in a property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Config

public Config()
Method Detail

load

public static void load(java.lang.String path)

getProperty

public static java.lang.String getProperty(java.lang.String name)
Returns null if the property is the empty string

Parameters:
name - property key
Returns:
the property with key name

getProperty

public static java.lang.String getProperty(java.lang.String name,
                                           java.lang.String defolt)
Returns the property from the props file, or the default if the property is null or the empty string

Parameters:
name - property key
defolt - default value
Returns:
property value

setProperty

public static void setProperty(java.lang.String key,
                               java.lang.String value)
Add in a property. And why not.

Parameters:
key - key
value - value


Copyright © 2005 Institute for Astronomy, Royal Observatory of Edinburgh. All Rights Reserved.