|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.beans.MutablePropertyValues
public class MutablePropertyValues
Default implementation of the PropertyValues interface. Allows simple manipulation of properties, and provides constructors to support deep copy and construction from a Map.
Constructor Summary | |
---|---|
MutablePropertyValues()
Creates a new empty MutablePropertyValues object. |
|
MutablePropertyValues(Map source)
Construct a new PropertyValues object from a Map. |
|
MutablePropertyValues(PropertyValues source)
Deep copy constructor. |
Method Summary | |
---|---|
MutablePropertyValues |
addPropertyValue(PropertyValue pv)
Add a PropertyValue object, replacing any existing one for the corresponding property. |
void |
addPropertyValue(String propertyName,
Object propertyValue)
Overloaded version of addPropertyValue that takes
a property name and a property value. |
MutablePropertyValues |
addPropertyValues(Map source)
Add all property values from the given Map. |
MutablePropertyValues |
addPropertyValues(PropertyValues source)
Copy all given PropertyValues into this object. |
PropertyValues |
changesSince(PropertyValues old)
Return the changes since the previous PropertyValues. |
void |
clear()
Clear this holder, removing all PropertyValues. |
boolean |
contains(String propertyName)
Is there a property value for this property? |
PropertyValue |
getPropertyValue(String propertyName)
Return the property value with the given name, if any. |
PropertyValue[] |
getPropertyValues()
Return an array of the PropertyValue objects held in this object. |
boolean |
isEmpty()
|
void |
removePropertyValue(PropertyValue pv)
Remove the given PropertyValue, if contained. |
void |
removePropertyValue(String propertyName)
Overloaded version of removePropertyValue that takes a property name. |
void |
setPropertyValueAt(PropertyValue pv,
int i)
Modify a PropertyValue object held in this object. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MutablePropertyValues()
addPropertyValue(PropertyValue)
,
addPropertyValue(String, Object)
public MutablePropertyValues(PropertyValues source)
source
- the PropertyValues to copyaddPropertyValues(PropertyValues)
public MutablePropertyValues(Map source)
source
- Map with property values keyed by property name,
which must be a StringaddPropertyValues(Map)
Method Detail |
---|
public MutablePropertyValues addPropertyValues(PropertyValues source)
source
- the PropertyValues to copy
public MutablePropertyValues addPropertyValues(Map source)
source
- Map with property values keyed by property name,
which must be a String
public MutablePropertyValues addPropertyValue(PropertyValue pv)
pv
- PropertyValue object to add
public void addPropertyValue(String propertyName, Object propertyValue)
addPropertyValue
that takes
a property name and a property value.
propertyName
- name of the propertypropertyValue
- value of the propertyaddPropertyValue(PropertyValue)
public void setPropertyValueAt(PropertyValue pv, int i)
public void removePropertyValue(String propertyName)
removePropertyValue
that takes a property name.
propertyName
- name of the propertyremovePropertyValue(PropertyValue)
public void removePropertyValue(PropertyValue pv)
pv
- the PropertyValue to removepublic void clear()
public PropertyValue[] getPropertyValues()
PropertyValues
getPropertyValues
in interface PropertyValues
public PropertyValue getPropertyValue(String propertyName)
PropertyValues
getPropertyValue
in interface PropertyValues
propertyName
- the name to search for
null
public boolean contains(String propertyName)
PropertyValues
contains
in interface PropertyValues
propertyName
- the name of the property we're interested in
public boolean isEmpty()
public PropertyValues changesSince(PropertyValues old)
PropertyValues
equals
.
changesSince
in interface PropertyValues
old
- old property values
Object.equals(java.lang.Object)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |