Skip navigation links
oracle.ide.util
Class DefaultPropertyAccess
java.lang.Object
oracle.ide.util.DefaultPropertyAccess
- All Implemented Interfaces:
- PropertyAccess
- Direct Known Subclasses:
- DefaultStructuredPropertyAccess
-
public class DefaultPropertyAccess
- extends java.lang.Object
- implements PropertyAccess
A very simple in-memory property access.
Field Summary |
protected java.util.HashMap |
_map
|
Method Summary |
protected java.lang.Object |
get(java.lang.Object key)
|
java.lang.String |
getProperty(java.lang.String key, java.lang.String defaultValue)
Retrieves the value associated with a property. |
protected java.lang.Object |
put(java.lang.Object key, java.lang.Object value)
|
protected java.lang.Object |
remove(java.lang.String key)
|
java.lang.Object |
removeProperty(java.lang.String key)
Removes the property. |
java.lang.Object |
setProperty(java.lang.String key, java.lang.String value)
Sets the value for a property. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_map
protected java.util.HashMap _map
DefaultPropertyAccess
public DefaultPropertyAccess()
get
protected final java.lang.Object get(java.lang.Object key)
put
protected final java.lang.Object put(java.lang.Object key,
java.lang.Object value)
remove
protected final java.lang.Object remove(java.lang.String key)
getProperty
public java.lang.String getProperty(java.lang.String key,
java.lang.String defaultValue)
- Description copied from interface:
PropertyAccess
- Retrieves the value associated with a property. If no value exists for the requested property, the specified default value is returned.
-
- Specified by:
getProperty
in interface PropertyAccess
-
- Parameters:
key
- the property key for which a value is desired.
defaultValue
- the value to return if no value currently exists.
- Returns:
- the value of the requested property, or the default value if the property does not exist.
setProperty
public java.lang.Object setProperty(java.lang.String key,
java.lang.String value)
- Description copied from interface:
PropertyAccess
- Sets the value for a property.
-
- Specified by:
setProperty
in interface PropertyAccess
-
- Parameters:
key
- the property key to set
value
- the string value to set
- Returns:
- the previous value
removeProperty
public java.lang.Object removeProperty(java.lang.String key)
- Description copied from interface:
PropertyAccess
- Removes the property.
-
- Specified by:
removeProperty
in interface PropertyAccess
-
- Parameters:
key
- the property key to remove
- Returns:
- the previous value
Skip navigation links
Copyright © 1997, 2011, Oracle. All rights reserved.