com.interface21.beans
Class PropertyValue

java.lang.Object
  |
  +--com.interface21.beans.PropertyValue

public class PropertyValue
extends java.lang.Object

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.

Since:
13 May 2001
Version:
$Id: PropertyValue.java,v 1.1.1.1 2003/02/11 08:10:11 johnsonr Exp $
Author:
Rod Johnson

Constructor Summary
PropertyValue(java.lang.String name, java.lang.Object value)
          Creates new PropertyValue
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.lang.String getName()
          Return the name of the property
 java.lang.Object getValue()
          Return the value of the property
 java.lang.String toString()
          Diagnostic method
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyValue

public PropertyValue(java.lang.String name,
                     java.lang.Object value)
Creates new PropertyValue
Parameters:
name - name of the property
value - value of the property (posibly before type conversion)
Method Detail

getName

public java.lang.String getName()
Return the name of the property
Returns:
the name of the property

getValue

public java.lang.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 java.lang.String toString()
Diagnostic method
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(Object)


Rod Johnson and Spring contributors 2001-2003.