T - The type of object contained within this Diff. Differences
between primitive objects are stored as their Object wrapper
equivalent.Serializable, Comparable<Pair<T,T>>, Map.Entry<T,T>public abstract class Diff<T> extends Pair<T,T>
A Diff contains the differences between two Diffable class
fields.
Typically, Diffs are retrieved by using a DiffBuilder to
produce a DiffResult, containing the differences between two objects.
| Modifier | Constructor | Description |
|---|---|---|
protected |
Diff(String fieldName) |
Constructs a new
Diff for the given field name. |
| Modifier and Type | Method | Description |
|---|---|---|
String |
getFieldName() |
Returns the name of the field.
|
Type |
getType() |
Returns the type of the field.
|
T |
setValue(T value) |
Throws
UnsupportedOperationException. |
String |
toString() |
Returns a
String representation of the Diff, with the
following format: |
protected Diff(String fieldName)
Constructs a new Diff for the given field name.
fieldName - the name of the fieldpublic final Type getType()
Returns the type of the field.
public final String getFieldName()
Returns the name of the field.
public final String toString()
Returns a String representation of the Diff, with the
following format:
[fieldname: left-value, right-value]
Copyright © 2001–2019. All rights reserved.