public class SimplePropertyObject extends java.lang.Object implements IPropertyObject
Modifier and Type | Field and Description |
---|---|
protected SimplePropertyChangeSupport |
pcs
The property change support.
|
protected java.util.Map |
properties
The properties
|
Constructor and Description |
---|
SimplePropertyObject()
Create a new property object.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.
|
java.util.Map |
getProperties()
Get the properties (bean accessor).
|
java.lang.Object |
getProperty(java.lang.String name)
Returns a property.
|
java.util.Set |
getPropertyNames()
Returns all of the properties.
|
boolean |
hasProperty(java.lang.String name)
Tests if the given property name exists
If an property is
null it exists |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.
|
void |
setProperties(java.util.Map properties)
Set the properties (bean accessor).
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets a property
|
java.lang.String |
toString()
Get the string representation.
|
protected java.util.Map properties
protected SimplePropertyChangeSupport pcs
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface IPropertyObject
name
- name of the propertypublic java.util.Set getPropertyNames()
getPropertyNames
in interface IPropertyObject
public void setProperty(java.lang.String name, java.lang.Object value)
setProperty
in interface IPropertyObject
name
- name of the propertyvalue
- value of the propertypublic boolean hasProperty(java.lang.String name)
IPropertyObject
null
it existshasProperty
in interface IPropertyObject
name
- the name of the property to testtrue
if and only if the property existspublic java.util.Map getProperties()
public void setProperties(java.util.Map properties)
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The PropertyChangeListener to be added.public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The PropertyChangeListener to be removed.public java.lang.String toString()
toString
in class java.lang.Object