T
- The type of object contained within this Diff
. Differences
between primitive objects are stored as their Object wrapper
equivalent.public abstract class Diff<T> extends Pair<T,T>
Diff
contains the differences between two Diffable
class
fields.
Typically, Diff
s are retrieved by using a DiffBuilder
to
produce a DiffResult
, containing the differences between two objects.
EMPTY_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
Diff(String fieldName)
Constructs a new
Diff for the given field name. |
Modifier and Type | Method and Description |
---|---|
String |
getFieldName()
Gets the name of the field.
|
Type |
getType()
Gets the type of the field.
|
T |
setValue(T value)
Throws
UnsupportedOperationException . |
String |
toString()
|
accept, apply, compareTo, emptyArray, equals, getKey, getLeft, getRight, getValue, hashCode, of, of, ofNonNull, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparingByKey, comparingByKey, comparingByValue, comparingByValue
public final String getFieldName()
public final T setValue(T value)
UnsupportedOperationException
.value
- ignoredCopyright © 2001–2023 The Apache Software Foundation. All rights reserved.