public abstract class ValueType
extends java.lang.Object
Object.hashCode() and
Object.equals(Object) using a sequence of fields. If two instances have the same runtime
class and the same sequence of fields, then they are considered equal.
This class implements the two Object methods mentioned above as well as
Object.toString().
| Modifier and Type | Class and Description |
|---|---|
static interface |
ValueType.FieldReceiver
An object that receives fields (names and current values) for processing.
|
| Constructor and Description |
|---|
ValueType() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addFields(ValueType.FieldReceiver fields)
Implement this method to report the name and value of each field.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
java.lang.String |
toString() |
protected abstract void addFields(ValueType.FieldReceiver fields)
public final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object