|
The Spring Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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(List propertyValueList)
Construct a new MutablePropertyValues object using the given List of PropertyValue objects as-is. |
|
MutablePropertyValues(Map original)
Construct a new MutablePropertyValues object from a Map. |
|
MutablePropertyValues(PropertyValues original)
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 other)
Add all property values from the given Map. |
MutablePropertyValues |
addPropertyValues(PropertyValues other)
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? |
boolean |
equals(Object other)
|
PropertyValue |
getPropertyValue(String propertyName)
Return the property value with the given name, if any. |
List |
getPropertyValueList()
Return the underlying List of PropertyValue objects in its raw form. |
PropertyValue[] |
getPropertyValues()
Return an array of the PropertyValue objects held in this object. |
int |
hashCode()
|
boolean |
isConverted()
Return whether this holder contains converted values only ( true),
or whether the values still need to be converted (false). |
boolean |
isEmpty()
Does this holder not contain any PropertyValue objects at all? |
void |
removePropertyValue(PropertyValue pv)
Remove the given PropertyValue, if contained. |
void |
removePropertyValue(String propertyName)
Overloaded version of removePropertyValue that takes a property name. |
void |
setConverted()
Mark this holder as containing converted values only (i.e. no runtime resolution needed anymore). |
void |
setPropertyValueAt(PropertyValue pv,
int i)
Modify a PropertyValue object held in this object. |
int |
size()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MutablePropertyValues()
addPropertyValue methods.
public MutablePropertyValues(PropertyValues original)
original - the PropertyValues to copyaddPropertyValues(PropertyValues)public MutablePropertyValues(Map original)
original - Map with property values keyed by property name StringsaddPropertyValues(Map)public MutablePropertyValues(List propertyValueList)
This is a constructor for advanced usage scenarios. It is not intended for typical programmatic use.
propertyValueList - List of PropertyValue objects| Method Detail |
|---|
public List getPropertyValueList()
This is an accessor for optimized access to all PropertyValue objects. It is not intended for typical programmatic use.
public MutablePropertyValues addPropertyValues(PropertyValues other)
other - the PropertyValues to copy
public MutablePropertyValues addPropertyValues(Map other)
other - 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 PropertyValuespublic PropertyValue getPropertyValue(String propertyName)
PropertyValues
getPropertyValue in interface PropertyValuespropertyName - the name to search for
nullpublic boolean contains(String propertyName)
PropertyValues
contains in interface PropertyValuespropertyName - the name of the property we're interested in
public boolean isEmpty()
PropertyValues
isEmpty in interface PropertyValuespublic int size()
public PropertyValues changesSince(PropertyValues old)
PropertyValuesequals.
changesSince in interface PropertyValuesold - old property values
Object.equals(java.lang.Object)public void setConverted()
public boolean isConverted()
true),
or whether the values still need to be converted (false).
public boolean equals(Object other)
public int hashCode()
public String toString()
|
The Spring Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||