edu.washington.cs.supple.rep.values
Class ValueObject

java.lang.Object
  extended byedu.washington.cs.supple.rep.values.ValueObject
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BeanlikeValueObject

public class ValueObject
extends java.lang.Object
implements java.io.Serializable

ValueObjects represent complex values. A value object contains a map from field names to value bindings.

Author:
dbc1
See Also:
Serialized Form

Constructor Summary
ValueObject()
           
 
Method Summary
 void addFieldValue(java.lang.String path, ValueBinding binding)
          Add a field to the value object.
 void copyFieldValues(ValueObject value)
          Copy field values from one value object to another.
 boolean equals(java.lang.Object obj)
           
 java.util.Collection getFieldNames()
           
 java.lang.Object getFieldValue(java.lang.String name)
          Get the actual value.
 ValueBinding getFieldValueBinding(java.lang.String path)
          Get the actual value binding.
 java.lang.String getIndexField()
           
 int hashCode()
           
 boolean hasIndexField()
           
 void setIndexField(java.lang.String index)
          Set the index field, if any.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueObject

public ValueObject()
Method Detail

copyFieldValues

public void copyFieldValues(ValueObject value)
Copy field values from one value object to another.

Parameters:
value -

addFieldValue

public void addFieldValue(java.lang.String path,
                          ValueBinding binding)
Add a field to the value object.


setIndexField

public void setIndexField(java.lang.String index)
Set the index field, if any.


hasIndexField

public boolean hasIndexField()
Returns:
if an index field has been defined.

getIndexField

public java.lang.String getIndexField()
Returns:
the index field name.

getFieldValueBinding

public ValueBinding getFieldValueBinding(java.lang.String path)
Get the actual value binding.


getFieldValue

public java.lang.Object getFieldValue(java.lang.String name)
Get the actual value.


getFieldNames

public java.util.Collection getFieldNames()
Returns:
the field names in this value object

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()

toString

public java.lang.String toString()