Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ifs.util
Class DataProperties

    java.lang.Object
      java.util.Dictionary
          java.util.Hashtable
              java.util.Properties
                  ifs.util.DataProperties

All Implemented Interfaces:
  Serializable, Cloneable, Map

    public class DataProperties

extends Properties

Data properties.

Version:
  1.0
Author:
  Tomáš Müller
See Also:
  Serialized Form

Field Summary

Fields inherited from class java.util.Properties
`defaults`

Constructor Summary
`DataProperties()` Constructor
`DataProperties(Dictionary properties)` Constructor
`DataProperties(Properties defaults)` Constructor

Method Summary
`boolean` | `containsPropery(String key)` Returns true if there is such property
`String` | `getProperty(String key, String defaultValue)` Returns string property
`boolean` | `getPropertyBoolean(String key, boolean defaultValue)` Returns boolean property
`double` | `getPropertyDouble(String key, double defaultValue)` Returns double property
`float` | `getPropertyFloat(String key, float defaultValue)` Returns float property
`int` | `getPropertyInt(String key, int defaultValue)` Returns int property
`long` | `getPropertyLong(String key, long defaultValue)` Returns long property
`void` | `load(InputStream inputStream)` Loads properties from an input stream
`Object` | `setProperty(String key, String value)` Sets string property
`Dictionary` | `toDict()` Returns properties as dictionary.

Methods inherited from class java.util.Properties
`getProperty, list, list, loadFromXML, propertyNames, save, store, storeToXML, storeToXML`

Methods inherited from class java.util.Hashtable
`clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DataProperties

    public DataProperties()

  Constructor

### DataProperties

    public DataProperties(Properties defaults)

  Constructor

  Parameters:
    `defaults` - default properties

### DataProperties

    public DataProperties(Dictionary properties)

  Constructor

  Parameters:
    `properties` - default properties

Method Detail

### getProperty

    public String getProperty(String key,
                              String defaultValue)

  Returns string property

  Overrides:
    `getProperty` in class `Properties`
  Parameters:
    `key` - key
    `defaultValue` - default value to be returned when such property is not present

### setProperty

    public Object setProperty(String key,
                              String value)

  Sets string property

  Overrides:
    `setProperty` in class `Properties`
  Parameters:
    `key` - key
    `value` - value

### getPropertyInt

    public int getPropertyInt(String key,
                              int defaultValue)

  Returns int property

  Parameters:
    `key` - key
    `defaultValue` - default value to be returned when such property is not present

### getPropertyLong

    public long getPropertyLong(String key,
                                long defaultValue)

  Returns long property

  Parameters:
    `key` - key
    `defaultValue` - default value to be returned when such property is not present

### containsPropery

    public boolean containsPropery(String key)

  Returns true if there is such property

  Parameters:
    `key` - key

### getPropertyBoolean

    public boolean getPropertyBoolean(String key,
                                      boolean defaultValue)

  Returns boolean property

  Parameters:
    `key` - key
    `defaultValue` - default value to be returned when such property is not present

### getPropertyDouble

    public double getPropertyDouble(String key,
                                    double defaultValue)

  Returns double property

  Parameters:
    `key` - key
    `defaultValue` - default value to be returned when such property is not present

### getPropertyFloat

    public float getPropertyFloat(String key,
                                  float defaultValue)

  Returns float property

  Parameters:
    `key` - key
    `defaultValue` - default value to be returned when such property is not present

### toDict

    public Dictionary toDict()

  Returns properties as dictionary.

### load

    public void load(InputStream inputStream)
              throws IOException

  Loads properties from an input stream

  Overrides:
    `load` in class `Properties`
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 Tomáš Müller