|
Oracle | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
com.compoze.util.ObjectProperties
public class ObjectProperties
This class extends the Java Properties class to provide get methods for primitive types and objects to the properties file.
Properties
,
Serialized FormField Summary |
---|
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
ObjectProperties()
Constructor. |
|
ObjectProperties(java.util.Properties defaults)
Constructor. |
Method Summary | |
---|---|
boolean |
getBoolean(java.lang.String sKey)
Get the property as a boolean. |
boolean |
getBoolean(java.lang.String sKey,
boolean bDefault)
Get the property as a boolean. |
byte |
getByte(java.lang.String sKey)
Get the property as a byte. |
byte |
getByte(java.lang.String sKey,
byte yDefault)
Get the property as a byte. |
double |
getDouble(java.lang.String sKey)
Get the property as a double. |
double |
getDouble(java.lang.String sKey,
double dDefault)
Get the property as a double. |
float |
getFloat(java.lang.String sKey)
Get the property as a float. |
float |
getFloat(java.lang.String sKey,
float fDefault)
Get the property as a float. |
int |
getInt(java.lang.String sKey)
Get the property as an int. |
int |
getInt(java.lang.String sKey,
int iDefault)
Get the property as an int. |
long |
getLong(java.lang.String sKey)
Get the property as a long. |
long |
getLong(java.lang.String sKey,
long lDefault)
Get the property as a long. |
java.lang.String |
getProperty(java.lang.String sKey)
Get a property, replacing keys inside ${} with other property values or system property values. |
java.lang.String |
getProperty(java.lang.String sKey,
java.lang.String sDefault)
Get a property, replacing keys inside ${} with other property values or system property values. |
short |
getShort(java.lang.String sKey)
Get the property as a short. |
short |
getShort(java.lang.String sKey,
short sDefault)
Get the property as a short. |
java.lang.String |
getString(java.lang.String sKey)
Get the property as a string. |
java.lang.String |
getString(java.lang.String sKey,
java.lang.String sDefault)
Get the property as a string. |
java.lang.String[] |
getStringArray(java.lang.String sKey)
Get the property as a string array (elements of the array are tokenized values). |
java.lang.String[] |
getStringArray(java.lang.String sKey,
java.lang.String sDelimiter)
Get the property as a string array (elements of the array are tokenized values). |
java.lang.String[] |
getStringArray(java.lang.String sKey,
java.lang.String sDelimiter,
java.lang.String sDefault)
Get the property as a string. |
java.lang.String |
replaceSubstitutions(java.lang.String sRawValue)
Replace substitutions in a string with their substituted properties. |
Methods inherited from class java.util.Properties |
---|
list, list, load, loadFromXML, propertyNames, save, setProperty, 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 |
---|
public ObjectProperties()
public ObjectProperties(java.util.Properties defaults)
defaults
- default propertiesMethod Detail |
---|
public boolean getBoolean(java.lang.String sKey)
sKey
- the property key
public boolean getBoolean(java.lang.String sKey, boolean bDefault)
sKey
- the property keybDefault
- the default value to return if key is not found
public byte getByte(java.lang.String sKey)
sKey
- the property key
java.lang.NumberFormatException
- if the byte could not be parsedpublic byte getByte(java.lang.String sKey, byte yDefault)
sKey
- the property keyyDefault
- the default value to return if key is not found
java.lang.NumberFormatException
- if the byte could not be parsedpublic short getShort(java.lang.String sKey)
sKey
- the property key
java.lang.NumberFormatException
- if the short could not be parsedpublic short getShort(java.lang.String sKey, short sDefault)
sKey
- the property keysDefault
- the default value to return if key is not found
java.lang.NumberFormatException
- if the short could not be parsedpublic int getInt(java.lang.String sKey)
sKey
- the property key
java.lang.NumberFormatException
- if the int could not be parsedpublic int getInt(java.lang.String sKey, int iDefault)
sKey
- the property keyiDefault
- the default value to return if key is not found
java.lang.NumberFormatException
- if the int could not be parsedpublic long getLong(java.lang.String sKey)
sKey
- the property key
java.lang.NumberFormatException
- if the long could not be parsedpublic long getLong(java.lang.String sKey, long lDefault)
sKey
- the property keylDefault
- the default value to return if key is not found
java.lang.NumberFormatException
- if the long could not be parsedpublic float getFloat(java.lang.String sKey)
sKey
- the property key
java.lang.NumberFormatException
- if the float could not be parsedpublic float getFloat(java.lang.String sKey, float fDefault)
sKey
- the property keyfDefault
- the default value to return if key is not found
java.lang.NumberFormatException
- if the float could not be parsedpublic double getDouble(java.lang.String sKey)
sKey
- the property key
java.lang.NumberFormatException
- if the double could not be parsedpublic double getDouble(java.lang.String sKey, double dDefault)
sKey
- the property keydDefault
- the default value to return if key is not found
java.lang.NumberFormatException
- if the double could not be parsedpublic java.lang.String getString(java.lang.String sKey)
sKey
- the property key
public java.lang.String getString(java.lang.String sKey, java.lang.String sDefault)
sKey
- the property keysDefault
- the default value to return if key is not found
public java.lang.String[] getStringArray(java.lang.String sKey)
sKey
- the property key
public java.lang.String[] getStringArray(java.lang.String sKey, java.lang.String sDelimiter)
sKey
- the property keysDelimiter
- the token delimiter
public java.lang.String[] getStringArray(java.lang.String sKey, java.lang.String sDelimiter, java.lang.String sDefault)
sKey
- the property keysDelimiter
- the token delimitersDefault
- the default value to use if key is not found
public java.lang.String getProperty(java.lang.String sKey)
getProperty
in class java.util.Properties
sKey
- the property key to look for
public java.lang.String getProperty(java.lang.String sKey, java.lang.String sDefault)
getProperty
in class java.util.Properties
sKey
- the property key to look forsDefault
- the default value if the specified key was not found
public java.lang.String replaceSubstitutions(java.lang.String sRawValue)
sRawValue
- the raw value
|
Oracle | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |