T - type of the left and right object.public static final class DiffBuilder.Builder<T> extends Object
| Constructor and Description |
|---|
Builder()
Constructs a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
DiffBuilder<T> |
build()
Builds a new configured
DiffBuilder. |
DiffBuilder.Builder<T> |
setLeft(T left)
Sets the left object.
|
DiffBuilder.Builder<T> |
setRight(T right)
Sets the right object.
|
DiffBuilder.Builder<T> |
setStyle(ToStringStyle style)
Sets the style will to use when outputting the objects,
null uses the default. |
DiffBuilder.Builder<T> |
setTestObjectsEquals(boolean testObjectsEquals)
Sets whether to test if left and right are the same or equal.
|
DiffBuilder.Builder<T> |
setToStringFormat(String toStringFormat)
Sets the two-argument format string for
String.format(String, Object...), for example "%s differs from %s". |
public DiffBuilder<T> build()
DiffBuilder.DiffBuilder.public DiffBuilder.Builder<T> setLeft(T left)
left - the left object.this instance.public DiffBuilder.Builder<T> setRight(T right)
right - the left object.this instance.public DiffBuilder.Builder<T> setStyle(ToStringStyle style)
null uses the default.style - the style to use when outputting the objects, null uses the default.this instance.public DiffBuilder.Builder<T> setTestObjectsEquals(boolean testObjectsEquals)
Diff if the trivially equal test is enabled and returns true. The result of this test is never changed throughout the life of this
DiffBuilder.testObjectsEquals - If true, this will test if lhs and rhs are the same or equal. All of the append(fieldName, left, right) methods will abort
without creating a field Diff if the trivially equal test is enabled and returns true. The result of this test is
never changed throughout the life of this DiffBuilder.this instance.public DiffBuilder.Builder<T> setToStringFormat(String toStringFormat)
String.format(String, Object...), for example "%s differs from %s".toStringFormat - null uses the default.this instance.Copyright © 2001–2025 The Apache Software Foundation. All rights reserved.