org.imageterrier.basictools
Class ApplicationSetupUtils

java.lang.Object
  extended by org.imageterrier.basictools.ApplicationSetupUtils

public class ApplicationSetupUtils
extends Object

Utility functions for getting and setting things in ApplicationSetup.

Author:
Jonathon Hare

Constructor Summary
ApplicationSetupUtils()
           
 
Method Summary
static double getProperty(String key, double defaultValue)
          Returns the value for the specified property, given a default value, in case the property was not defined during the initialization of the system.
static float getProperty(String key, float defaultValue)
          Returns the value for the specified property, given a default value, in case the property was not defined during the initialization of the system.
static int getProperty(String key, int defaultValue)
          Returns the value for the specified property, given a default value, in case the property was not defined during the initialization of the system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationSetupUtils

public ApplicationSetupUtils()
Method Detail

getProperty

public static int getProperty(String key,
                              int defaultValue)
Returns the value for the specified property, given a default value, in case the property was not defined during the initialization of the system. The property values are read from the properties file. If the value of the property terrier.usecontext is true, then the properties file is overridden by the context. If the value of the property terrier.usecontext is false, then the properties file is overridden

Parameters:
key - The property to be returned
defaultValue - The default value used, in case it is not defined
Returns:
the value for the given property.

getProperty

public static float getProperty(String key,
                                float defaultValue)
Returns the value for the specified property, given a default value, in case the property was not defined during the initialization of the system. The property values are read from the properties file. If the value of the property terrier.usecontext is true, then the properties file is overridden by the context. If the value of the property terrier.usecontext is false, then the properties file is overridden

Parameters:
key - The property to be returned
defaultValue - The default value used, in case it is not defined
Returns:
the value for the given property.

getProperty

public static double getProperty(String key,
                                 double defaultValue)
Returns the value for the specified property, given a default value, in case the property was not defined during the initialization of the system. The property values are read from the properties file. If the value of the property terrier.usecontext is true, then the properties file is overridden by the context. If the value of the property terrier.usecontext is false, then the properties file is overridden

Parameters:
key - The property to be returned
defaultValue - The default value used, in case it is not defined
Returns:
the value for the given property.


Copyright © 2011 The University of Southampton. All Rights Reserved.