|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdsto.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 PropertySetpublic List getPropertyValues(String propertyName)
PropertySet
getPropertyValues in interface PropertySetpropertyName - 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 PropertySetpublic void removeProperty(String propertyName)
PropertySet
removeProperty in interface PropertySet
public boolean removePropertyValue(String propertyName,
Object value)
throws UnsupportedOperationException
PropertySet
removePropertyValue in interface PropertySetUnsupportedOperationException - if property values
cannot be changed.public boolean hasProperty(String propertyName)
PropertySet
hasProperty in interface PropertySetpublic void removeAll()
PropertySet
removeAll in interface PropertySet
public void addPropertyValue(String propertyName,
Object newValue)
PropertySet
addPropertyValue in interface PropertySetpublic boolean isModifiable()
PropertySet
isModifiable in interface PropertySetpublic void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener in interface PropertySetpublic void removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener in interface PropertySet
public Object clone()
throws CloneNotSupportedException
clone in interface PropertySetclone in class ObjectCloneNotSupportedException
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 | |||||||||