NextApp Echo
App Container 1.0.5

nextapp.echoservlet.util
Class PropertyMap

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended bynextapp.echoservlet.util.PropertyMap
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class PropertyMap
extends java.util.HashMap
implements java.io.Serializable

A Map that is generated from a properties file. This class provides additional methods for returning properties as Strings or arrays of Strings.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.HashMap
 
Nested classes inherited from class java.util.AbstractMap
 
Field Summary
 
Fields inherited from class java.util.HashMap
 
Fields inherited from class java.util.AbstractMap
 
Constructor Summary
PropertyMap(java.lang.String resourceName)
          Create a PropertyMap
 
Method Summary
 boolean getBoolean(java.lang.String key)
          Returns true if the value identified by key is equal to ""1"".
 int getInteger(java.lang.String key)
          Returns the value identified by key as an int if it the value is numeric.
 java.lang.String getString(java.lang.String key)
          Returns the value identified by key as a String if it is one, otherwise throws a ClassCastException.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

PropertyMap

public PropertyMap(java.lang.String resourceName)
Create a PropertyMap

Parameters:
resourceName - The name of the properties file to load.
Method Detail

getBoolean

public boolean getBoolean(java.lang.String key)
Returns true if the value identified by key is equal to ""1"".

Parameters:
key - the name of the property to return.
Returns:
true if the value of the property is "1".

getInteger

public int getInteger(java.lang.String key)
Returns the value identified by key as an int if it the value is numeric. Zero is returned if the value is null or otherwise not numeric.

Parameters:
key - the name of the property to return.
Returns:
The integer value of the property.

getString

public java.lang.String getString(java.lang.String key)
Returns the value identified by key as a String if it is one, otherwise throws a ClassCastException.

Parameters:
key - The name of the property to return.
Returns:
value The value of the property identified by key as a String.

NextApp Echo
App Container 1.0.5