org.springframework.beans
Class PropertyValue
- public class PropertyValue
Class to hold information and value for an individual property.
Using an object here, rather than just storing all properties in a
map keyed by property name, allows for more flexibility, and the
ability to handle indexed properties etc. if necessary.
Note that the value doesn't need to be the final required type:
a BeanWrapper implementation should handle any necessary conversion,
as this object doesn't know anything about the objects it will be
applied to.
- Author:
- Rod Johnson
- Version: $Id: PropertyValue.java,v 1.1.1.1 2003/08/14 16:20:17 trisberg Exp $
- Since: 13 May 2001
| Constructor Summary |
PropertyValue(String name, Object value) Creates new PropertyValue. |
| Method Summary |
boolean | equals(Object other) |
String | getName() Return the name of the property. |
Object | getValue() Return the value of the property. |
String | toString() |
PropertyValue
public PropertyValue(String name, Object value)
- Creates new PropertyValue.
- Parameters:
- name - name of the property
- value - value of the property (posibly before type conversion)
equals
public boolean equals(Object other)
getName
public String getName()
- Return the name of the property.
- Returns: the name of the property
getValue
public Object getValue()
- Return the value of the property.
- Returns: the value of the property. Type conversion
will probably not have occurred. It is the responsibility
of BeanWrapper implementations to perform type conversion.
toString
public String toString()
to Class java.lang.String- Property name