|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dsto.dfc.collections.BasicPropertySet
public class BasicPropertySet
An implementation of PropertySet using HashMap and ArrayList.
Field Summary |
---|
Fields inherited from interface dsto.dfc.collections.PropertySet |
---|
EMPTY_PROPERTY_SET |
Constructor Summary | |
---|---|
BasicPropertySet()
|
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
addPropertyValue(String propertyName,
Object newValue)
Add a values to the end of the list of property values. |
void |
addPropertyValues(String propertyName,
List values)
Add a set of values to a property. |
Object |
clone()
|
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
|
Set |
getPropertyNames()
The names of defined properties. |
Object |
getPropertyValue(String propertyName)
Get the value of a property. |
List |
getPropertyValues(String propertyName)
The values of a property. |
protected ArrayList |
getValueAsList(String propertyName)
Get the value of a property as a List, handling the case where a single value for property has been stored directly. |
boolean |
hasProperty(String propertyName)
True if a property has any defined values. |
boolean |
isModifiable()
True if property set may be changed. |
void |
removeAll()
Undefine all properties in the set |
void |
removeProperty(String propertyName)
Remove all values of a property (ie undefine it). |
void |
removePropertyChangeListener(PropertyChangeListener l)
|
boolean |
removePropertyValue(String propertyName,
Object value)
Remove the first occurrence of a value from a list of property values. |
void |
setPropertyValue(String propertyName,
Object value)
|
void |
setPropertyValues(String propertyName,
List values)
Set the values of a property. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicPropertySet()
Method Detail |
---|
public Set getPropertyNames()
PropertySet
getPropertyNames
in interface PropertySet
public List getPropertyValues(String propertyName)
PropertySet
getPropertyValues
in interface PropertySet
propertyName
- The name of the property.
public Object getPropertyValue(String propertyName)
PropertySet
getPropertyValue
in interface PropertySet
public void addPropertyValues(String propertyName, List values)
PropertySet
addPropertyValues
in interface PropertySet
public void setPropertyValues(String propertyName, List values)
PropertySet
setPropertyValues
in interface PropertySet
public void setPropertyValue(String propertyName, Object value)
setPropertyValue
in interface PropertySet
public void removeProperty(String propertyName)
PropertySet
removeProperty
in interface PropertySet
public boolean removePropertyValue(String propertyName, Object value) throws UnsupportedOperationException
PropertySet
removePropertyValue
in interface PropertySet
UnsupportedOperationException
- if property values
cannot be changed.public boolean hasProperty(String propertyName)
PropertySet
hasProperty
in interface PropertySet
public void removeAll()
PropertySet
removeAll
in interface PropertySet
public void addPropertyValue(String propertyName, Object newValue)
PropertySet
addPropertyValue
in interface PropertySet
public boolean isModifiable()
PropertySet
isModifiable
in interface PropertySet
public void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener
in interface PropertySet
public void removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener
in interface PropertySet
public Object clone() throws CloneNotSupportedException
clone
in interface PropertySet
clone
in class Object
CloneNotSupportedException
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
protected ArrayList getValueAsList(String propertyName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |