package org.springframework.beans;
Default implementation of the PropertyValues interface.
Allows simple manipulation of properties, and provides constructors
to support deep copy and construction from a Map.
- Author(s):
- Rod Johnson
- Since:
- 13 May 2001
List of PropertyValue objects
Creates a new empty MutablePropertyValues object.
Property values can be added with the addPropertyValue methods.
Deep copy constructor. Guarantees PropertyValue references
are independent, although it can't deep copy objects currently
referenced by individual PropertyValue objects.
for (int i = 0; i < pvs.length; i++) { Construct a new PropertyValues object from a Map.
Copy all given PropertyValues into this object. Guarantees PropertyValue
references are independent, although it can't deep copy objects currently
referenced by individual PropertyValue objects.
- Parameters:
source the PropertyValues to copy- Returns:
- this object to allow creating objects, adding multiple PropertyValues
in a single statement
for (int i = 0; i < pvs.length; i++) { Add all property values from the given Map.
- Parameters:
source Map with property values keyed by property name,
which must be a String- Returns:
- this object to allow creating objects, adding multiple
PropertyValues in a single statement
Add a PropertyValue object, replacing any existing one
for the corresponding property.
- Parameters:
pv PropertyValue object to add- Returns:
- this object to allow creating objects, adding multiple
PropertyValues in a single statement
Overloaded version of addPropertyValue that takes
a property name and a property value.
Remove the given PropertyValue, if contained.
- Parameters:
pv the PropertyValue to remove
Overloaded version of removePropertyValue that takes a property name.
Modify a PropertyValue object held in this object.
Indexed from 0.
else if (!pvOld.equals(newPv)) {