Overview | Package | Class | Tree | Deprecated | Index | Help
| BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.beasys.util
Class TypedProperties

    java.lang.Object
      |
      +--java.util.Dictionary
            |
            +--java.util.Hashtable
                  |
                  +--java.util.Properties
                        |
                        +--com.beasys.util.TypedProperties

Direct Known Subclasses:
  PortalPropertiesBean

public class TypedProperties
extends java.util.Properties

Extension of properties class to return typed versions of your properties.

See Also:
  Serialized Form

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

Constructor Summary
`TypedProperties()` Default constructor.

Method Summary
`java.lang.String[]` | `getPropertyAsArray(java.lang.String aPropertyName)` If a property has a comma separated list, this method will parse it into a String array.
`boolean` | `getPropertyAsBool(java.lang.String aPropertyName)` Get a boolean property value.
`boolean` | `getPropertyAsBool(java.lang.String aPropertyName, boolean def)` Get a boolean property value.
`double` | `getPropertyAsDouble(java.lang.String aPropertyName)` Get the property as a double value.
`float` | `getPropertyAsFloat(java.lang.String aPropertyName)` Get the property as a float value.
`double` | `getPropertyAsFloat(java.lang.String aPropertyName, double def)` Get the property as a double value.
`float` | `getPropertyAsFloat(java.lang.String aPropertyName, float def)` Get the property as a float value.
`int` | `getPropertyAsInt(java.lang.String aPropertyName)` Look for a property and return it as an int.
`int` | `getPropertyAsInt(java.lang.String aPropertyName, int def)` Look for a property and return it as an int.
`long` | `getPropertyAsLong(java.lang.String aPropertyName)` Get the property as a long value.
`long` | `getPropertyAsLong(java.lang.String aPropertyName, long def)` Get the property as a long value.
`java.lang.String` | `getPropertyAsString(java.lang.String aPropertyName)` Just does getProperty.
`int` | `getPropertyHexAsInt(java.lang.String aPropertyName)` Return a hex representation of a number as a base 10 int.
`int` | `getPropertyHexAsInt(java.lang.String aPropertyName, int def)` Return a hex representation of a number as a base 10 int.

Methods inherited from class java.util.Properties
`getProperty, getProperty, list, list, load, propertyNames, save, setProperty, store`

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

### TypedProperties

    public TypedProperties()

  Default constructor.

Method Detail

### getPropertyAsInt

    public int getPropertyAsInt(java.lang.String aPropertyName,
                                int def)

  Look for a property and return it as an int.
  Parameters:
    `aPropertyName` - the property name.
    `def` - the default int value if the property is not found.
  Returns:
    int the value

### getPropertyAsInt

    public int getPropertyAsInt(java.lang.String aPropertyName)

  Look for a property and return it as an int.
  Parameters:
    `aPropertyName` - the property name.
  Returns:
    int the value(-1 if not found)

### getPropertyHexAsInt

    public int getPropertyHexAsInt(java.lang.String aPropertyName,
                                   int def)

  Return a hex representation of a number as a base 10 int.
  Parameters:
    `aPropertyName` - the property name to look for.
    `def` - the default value.
  Returns:
    int

### getPropertyHexAsInt

    public int getPropertyHexAsInt(java.lang.String aPropertyName)

  Return a hex representation of a number as a base 10 int.
  Parameters:
    `aPropertyName` - the property name to look for.
  Returns:
    int (-1 if not found)

### getPropertyAsLong

    public long getPropertyAsLong(java.lang.String aPropertyName,
                                  long def)

  Get the property as a long value.
  Parameters:
    `aPropertyName` - the property name.
    `def` - the default value.
  Returns:
    long

### getPropertyAsLong

    public long getPropertyAsLong(java.lang.String aPropertyName)

  Get the property as a long value.
  Parameters:
    `aPropertyName` - the property name.
  Returns:
    long (-1 if not found)

### getPropertyAsFloat

    public float getPropertyAsFloat(java.lang.String aPropertyName,
                                    float def)

  Get the property as a float value.
  Parameters:
    `aPropertyName` - the property name.
    `def` - the default value.
  Returns:
    float

### getPropertyAsFloat

    public float getPropertyAsFloat(java.lang.String aPropertyName)

  Get the property as a float value.
  Parameters:
    `aPropertyName` - the property name.
  Returns:
    float (-1 if not found)

### getPropertyAsFloat

    public double getPropertyAsFloat(java.lang.String aPropertyName,
                                     double def)

  Get the property as a double value.
  Parameters:
    `aPropertyName` - the property name.
    `def` - the default value.
  Returns:
    double

### getPropertyAsDouble

    public double getPropertyAsDouble(java.lang.String aPropertyName)

  Get the property as a double value.
  Parameters:
    `aPropertyName` - the property name.
  Returns:
    double (-1 if not found)

### getPropertyAsString

    public java.lang.String getPropertyAsString(java.lang.String aPropertyName)

  Just does getProperty.
  Parameters:
    `aPropertyName` - the property name.
  Returns:
    String

### getPropertyAsBool

    public boolean getPropertyAsBool(java.lang.String aPropertyName,
                                     boolean def)

  Get a boolean property value.
  Parameters:
    `aPropertyName` - the property name
    `def` - the default value
  Returns:
    boolean

### getPropertyAsBool

    public boolean getPropertyAsBool(java.lang.String aPropertyName)

  Get a boolean property value.
  Parameters:
    `aPropertyName` - the property name
  Returns:
    boolean (if not found defaults to false)

### getPropertyAsArray

    public java.lang.String[] getPropertyAsArray(java.lang.String aPropertyName)

  If a property has a comma separated list, this method will parse it into a String array.
  Parameters:
    `String` - the property name.
  Returns:
    String[] the array of values.

Overview | Package | Class | Tree | Deprecated | Index | Help
| BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 BEA Systems, Inc. All Rights Reserved