ZetaGrid v1.9

zeta.util
Class Properties

java.lang.Object
  |
  +--zeta.util.Properties

public class Properties
extends java.lang.Object

The Properties class represents a persistent set of properties.


Field Summary
private  java.lang.String propertyFilename
           
private  java.util.Properties props
          The main property list.
 
Constructor Summary
Properties()
          Creates a property list with the keys of the property file "zeta_tools.cfg."
Properties(java.lang.String propertyFilename)
          Creates a property list with the keys of the specified property file.
 
Method Summary
 java.lang.String get(java.lang.String key)
          Searches for the property with the specified key in this property list.
 int get(java.lang.String key, int defaultValue)
          Searches for the property with the specified key in this property list.
 java.lang.String get(java.lang.String key, java.lang.String defaultValue)
          Searches for the property with the specified key in this property list.
 void load()
          Loads the property file.
 void reload()
          Reloads the property file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertyFilename

private java.lang.String propertyFilename

props

private java.util.Properties props
The main property list.

Constructor Detail

Properties

public Properties()
           throws java.io.IOException
Creates a property list with the keys of the property file "zeta_tools.cfg."


Properties

public Properties(java.lang.String propertyFilename)
           throws java.io.IOException
Creates a property list with the keys of the specified property file.

Method Detail

reload

public void reload()
            throws java.io.IOException
Reloads the property file.

java.io.IOException

load

public void load()
          throws java.io.IOException
Loads the property file.

java.io.IOException

get

public java.lang.String get(java.lang.String key)
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns null if the property is not found.

Parameters:
key - the property key.

get

public java.lang.String get(java.lang.String key,
                            java.lang.String defaultValue)
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found.

Parameters:
key - the property key.
defaultValue - a default value.
Returns:
the value in this property list with the specified key value.

get

public int get(java.lang.String key,
               int defaultValue)
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found or not an integer.

Parameters:
key - the property key.
defaultValue - a default value.
Returns:
the value in this property list with the specified key value.

ZetaGrid v1.9

For further technical papers, see ZetaGrid Technical Documentation.
 
Copyright © 2001,2002 Sebastian Wedeniwski. All Rights Reserved.