| java.util.Properties org.isqlviewer.util.UserProperties
UserProperties | public class UserProperties extends Properties (Code) | | TODO Add UserProperties Overview JavaDoc.
author: Mark A. Kobold <mkobold at isqlviewer dot com> version: 1.0 |
Method Summary | |
public boolean | containsAllKeys(Collection keySet) Takes the a list of keys then iterators through the list and validates that all keys are contained as keys with
the UserProperties. | final public boolean | containsKey(Object key) | final public String | get(String key, String def) Returns the String value of the string associated with the specified key.
Parameters: key - key whose associated value is to be returned as a char. Parameters: def - the value to be returned in the event that this object has no value associated with key. | final public String | get(String key) Returns the String value of the string associated with the specified key.
This returns null as the default value.
Parameters: key - key whose associated value is to be returned as a String. | final public Object | get(Object key) | final public boolean | getBoolean(String key, boolean def) Returns the boolean value of the string associated with the specified key.
Parameters: key - key whose associated value is to be returned as a double. Parameters: def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a boolean. | final public boolean | getBoolean(String key) Returns the boolean value of the string associated with the specified key.
This returns false as the default value.
Parameters: key - key whose associated value is to be returned as a boolean. | final public double | getDouble(String key, double def) Returns the double value of the string associated with the specified key.
Parameters: key - key whose associated value is to be returned as a double. Parameters: def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a float. | final public double | getDouble(String key) Returns the double value of the string associated with the specified key.
This will use the constant Double.NaN as the default value.
Parameters: key - key whose associated value is to be returned as a double. | final public float | getFloat(String key, float def) Returns the float value of the string associated with the specified key.
Parameters: key - key whose associated value is to be returned as a float. Parameters: def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a float. | final public float | getFloat(String key) Returns the float value of the string associated with the specified key.
This returns Float.NaN as the default value.
Parameters: key - key whose associated value is to be returned as a float. | final public int | getInt(String key, int def) Returns the int value of the string associated with the specified key.
Parameters: key - key whose associated value is to be returned as a int. Parameters: def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as an int. | final public int | getInt(String key) Returns the int value of the string associated with the specified key.
This returns Integer.MIN_VALUE as the default value.
Parameters: key - key whose associated value is to be returned as a double. | final public long | getLong(String key) Returns the long value of the string associated with the specified key.
This returns Long.MIN_VALUE as the default value.
Parameters: key - key whose associated value is to be returned as a long. | final public long | getLong(String key, long def) Returns the long value of the string associated with the specified key.
Parameters: key - key whose associated value is to be returned as a long. Parameters: def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a long. | protected Object | getObjectProperty(String key) | public String | getProperty(String key, String defaultValue) | public String | getProperty(String key) | final public short | getShort(String key) Returns the short value of the string associated with the specified key.
This returns Short.MIN_VALUE as the default value.
Parameters: key - key whose associated value is to be returned as a long. | final public short | getShort(String key, short def) Returns the short value of the string associated with the specified key.
Parameters: key - key whose associated value is to be returned as a short. Parameters: def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a short. | final public void | put(String key, String value) Associates a string representing the specified String value. | final public Object | put(Object key, Object value) | final public void | putBoolean(String key, boolean value) Associates a string representing the specified boolean value. | final public void | putByte(String key, byte value) Sets the byte property with the given key name. | final public void | putDouble(String key, double value) Associates a string representing the specified double value. | final public void | putFloat(String key, float value) Associates a string representing the specified float value. | final public void | putInt(String key, int value) Associates a string representing the specified int value. | final public void | putLong(String key, long value) Associates a string representing the specified long value. | final public void | putShort(String key, short value) Sets the short property with the given key name. | final public synchronized void | removeAll(Map map) Removes all keys from map.
Takes the keys from map and removes them from this object. | public String | removeProperty(String property) Removes a property from current mapping.
Parameters: property - property name to remove. | final public synchronized void | renameProperty(String oldName, String newName) Renames an existing property to a new name. | protected Object | setObjectProperty(String key, Object value) |
containsAllKeys | public boolean containsAllKeys(Collection keySet)(Code) | | Takes the a list of keys then iterators through the list and validates that all keys are contained as keys with
the UserProperties.
Parameters: keySet - the keyset to validate againist false if the key is not contained |
containsKey | final public boolean containsKey(Object key)(Code) | | |
get | final public String get(String key)(Code) | | Returns the String value of the string associated with the specified key.
This returns null as the default value.
Parameters: key - key whose associated value is to be returned as a String. the String value represented by the string associated with key in this object. throws: NullPointerException - if key is null. See Also: UserProperties.put(String,String) |
getBoolean | final public boolean getBoolean(String key, boolean def)(Code) | | Returns the boolean value of the string associated with the specified key.
Parameters: key - key whose associated value is to be returned as a double. Parameters: def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a boolean. the boolean value represented by the string associated with key in this object, ordef if the associated value does not exist or cannot be interpreted as a boolean. throws: NullPointerException - if key is null. See Also: UserProperties.putBoolean(String,boolean) See Also: UserProperties.get(String,String) |
getDouble | final public double getDouble(String key, double def)(Code) | | Returns the double value of the string associated with the specified key.
Parameters: key - key whose associated value is to be returned as a double. Parameters: def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a float. the double value represented by the string associated with key in this object, or defif the associated value does not exist or cannot be interpreted as a double. throws: NullPointerException - if key is null. See Also: UserProperties.putDouble(String,double) See Also: UserProperties.get(String,String) |
getFloat | final public float getFloat(String key, float def)(Code) | | Returns the float value of the string associated with the specified key.
Parameters: key - key whose associated value is to be returned as a float. Parameters: def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a float. the float value represented by the string associated with key in this object, or defif the associated value does not exist or cannot be interpreted as a float. throws: NullPointerException - if key is null. See Also: UserProperties.putFloat(String,float) See Also: UserProperties.get(String,String) |
getInt | final public int getInt(String key, int def)(Code) | | Returns the int value of the string associated with the specified key.
Parameters: key - key whose associated value is to be returned as a int. Parameters: def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as an int. the boolean value represented by the string associated with key in this object, ordef if the associated value does not exist or cannot be interpreted as an int. throws: NullPointerException - if key is null. See Also: UserProperties.putInt(String,int) See Also: UserProperties.get(String,String) |
getLong | final public long getLong(String key, long def)(Code) | | Returns the long value of the string associated with the specified key.
Parameters: key - key whose associated value is to be returned as a long. Parameters: def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a long. the long value represented by the string associated with key in this object, or defif the associated value does not exist or cannot be interpreted as a long. throws: NullPointerException - if key is null. See Also: UserProperties.putLong(String,long) See Also: UserProperties.get(String,String) |
getShort | final public short getShort(String key, short def)(Code) | | Returns the short value of the string associated with the specified key.
Parameters: key - key whose associated value is to be returned as a short. Parameters: def - the value to be returned in the event that this object has no value associated with key orthe associated value cannot be interpreted as a short. the long value represented by the string associated with key in this object, or defif the associated value does not exist or cannot be interpreted as a short. throws: NullPointerException - if key is null. See Also: UserProperties.putShort(String,short) See Also: UserProperties.get(String,String) |
put | final public void put(String key, String value)(Code) | | Associates a string representing the specified String value.
Parameters: key - key with which the string form of value is to be associated. Parameters: value - value whose String form is to be associated with key. throws: NullPointerException - if key is null. See Also: UserProperties.get(String,String) |
putBoolean | final public void putBoolean(String key, boolean value)(Code) | | Associates a string representing the specified boolean value.
Parameters: key - key with which the string form of value is to be associated. Parameters: value - value whose boolean form is to be associated with key. throws: NullPointerException - if key is null. See Also: UserProperties.getBoolean(String,boolean) |
putByte | final public void putByte(String key, byte value)(Code) | | Sets the byte property with the given key name.
Parameters: key - key with which the string form of value is to be associated. Parameters: value - value whose byte form is to be associated with key. throws: NullPointerException - if key is null. See Also: UserProperties.getShort(String,short) |
putDouble | final public void putDouble(String key, double value)(Code) | | Associates a string representing the specified double value.
Parameters: key - key with which the string form of value is to be associated. Parameters: value - value whose double form is to be associated with key. throws: NullPointerException - if key is null. See Also: UserProperties.getDouble(String,double) |
putFloat | final public void putFloat(String key, float value)(Code) | | Associates a string representing the specified float value.
Parameters: key - key with which the string form of value is to be associated. Parameters: value - value whose float form is to be associated with key. throws: NullPointerException - if key is null. See Also: UserProperties.getFloat(String,float) |
putInt | final public void putInt(String key, int value)(Code) | | Associates a string representing the specified int value.
Parameters: key - key with which the string form of value is to be associated. Parameters: value - value whose int form is to be associated with key. throws: NullPointerException - if key is null. See Also: UserProperties.getInt(String,int) |
putLong | final public void putLong(String key, long value)(Code) | | Associates a string representing the specified long value.
Parameters: key - key with which the string form of value is to be associated. Parameters: value - value whose long form is to be associated with key. throws: NullPointerException - if key is null. See Also: UserProperties.getLong(String,long) |
putShort | final public void putShort(String key, short value)(Code) | | Sets the short property with the given key name.
Parameters: key - key with which the string form of value is to be associated. Parameters: value - value whose long form is to be associated with key. throws: NullPointerException - if key is null. See Also: UserProperties.getShort(String,short) |
removeAll | final public synchronized void removeAll(Map map)(Code) | | Removes all keys from map.
Takes the keys from map and removes them from this object. In terms of set theory the properties are removed by
the intersection of the given map and this object.
Parameters: map - map that contains the keys to removes. |
removeProperty | public String removeProperty(String property)(Code) | | Removes a property from current mapping.
Parameters: property - property name to remove. property as a string, null if the property does not exist. |
renameProperty | final public synchronized void renameProperty(String oldName, String newName)(Code) | | Renames an existing property to a new name.
Parameters: oldName - the old property name to change. Parameters: newName - property name to change the oldName to. |
|
|