public abstract class PropertySet extends Object
The implementation attempts to spare memory as much as possible because it assumes that most objects will have no properties at all.
This class is not thread-safe.
Modifier and Type | Method and Description |
---|---|
Iterator<Object[]> |
getProperties()
Returns an Iterator of the properties contained in this property set.
|
Object |
getProperty(Object key)
Returns the value of specified property.
|
int |
getPropertyCount()
Returns the number of properties contained in this property set.
|
boolean |
hasProperty(Object key)
Tests if this property set contains specified property.
|
void |
putProperties(PropertySet other)
Adds (or replaces) all the properties found in specified set.
|
Object |
putProperty(Object key,
Object value)
Adds or replaces a property.
|
void |
removeAllProperties()
Removes all properties from set.
|
Object |
removeProperty(Object key)
Removes a property.
|
public void putProperties(PropertySet other)
other
- contains the properties to be added to this setpublic Object putProperty(Object key, Object value)
key
- the property namevalue
- the property valuenull
if property has been addedpublic Object removeProperty(Object key)
key
- the property namenull
otherwisepublic void removeAllProperties()
public boolean hasProperty(Object key)
key
- the property nametrue
if this property set contains the specified
property and false
otherwise.public Object getProperty(Object key)
key
- the property namenull
otherwise.public int getPropertyCount()