org.vizzini.game
Class ConfigUtilities

java.lang.Object
  extended by org.vizzini.game.ConfigUtilities

public class ConfigUtilities
extends Object

Provides convenience methods for processing configuration properties.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Method Summary
protected static void checkInputs(Properties properties, String propertyName)
          Check the validity of the input arguments.
static ConfigUtilities getInstance()
          Return the singleton instance of this class.
 IntegerPosition getIntegerPositionProperty(Properties properties, String propertyName)
          Return the required value specified by the given property name from the given properties.
 IntegerPosition getIntegerPositionProperty(Properties properties, String propertyName, boolean isRequired)
          Return the value specified by the given property name from the given properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ConfigUtilities getInstance()
Return the singleton instance of this class.

Returns:
The single instance.
Since:
v0.3

getIntegerPositionProperty

public IntegerPosition getIntegerPositionProperty(Properties properties,
                                                  String propertyName)
Return the required value specified by the given property name from the given properties.

Parameters:
properties - Source of data.
propertyName - Property name.
Since:
v0.1

getIntegerPositionProperty

public IntegerPosition getIntegerPositionProperty(Properties properties,
                                                  String propertyName,
                                                  boolean isRequired)
Return the value specified by the given property name from the given properties.

Parameters:
properties - Source of data.
propertyName - Property name.
isRequired - Flag indicating if the property is required.
Since:
v0.1

checkInputs

protected static void checkInputs(Properties properties,
                                  String propertyName)
Check the validity of the input arguments.

Since:
v0.1


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02