DiffBuilder.Builder
- public static final class org.apache.commons.lang3.builder.DiffBuilder.Builder<T>[source]
Constructs a new instance.
- Parameters:
<T> – type of the left and right object.
- Since:
3.15.0
Constructors
Constructs a new instance. |
Methods
Builds a new configured |
|
Sets the left object. |
|
Sets the right object. |
|
Sets the style will to use when outputting the objects, |
|
Sets whether to test if left and right are the same or equal. |
|
Sets the two-argument format string for |
- public DiffBuilder<T> build()[source]
Builds a new configured
DiffBuilder.- Returns:
A new configured
DiffBuilder.
- public DiffBuilder.Builder<T> setLeft(T left)[source]
Sets the left object.
- Parameters:
left – The left object.
- Returns:
thisinstance.
- public DiffBuilder.Builder<T> setRight(T right)[source]
Sets the right object.
- Parameters:
right – The left object.
- Returns:
thisinstance.
- public DiffBuilder.Builder<T> setStyle(ToStringStyle style)[source]
Sets the style will to use when outputting the objects,
nulluses the default.- Parameters:
style – The style to use when outputting the objects,
nulluses the default.- Returns:
thisinstance.
- public DiffBuilder.Builder<T> setTestObjectsEquals(boolean testObjectsEquals)[source]
Sets whether to test if left and right are the same or equal. All of the append(fieldName, left, right) methods will abort without creating a field
Diffif the trivially equal test is enabled and returns true. The result of this test is never changed throughout the life of thisDiffBuilder.- Parameters:
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
Diffif the trivially equal test is enabled and returns true. The result of this test is never changed throughout the life of thisDiffBuilder.- Returns:
thisinstance.
- public DiffBuilder.Builder<T> setToStringFormat(String toStringFormat)[source]
Sets the two-argument format string for
String#format(String, Object...), for example"%s differs from %s".- Parameters:
toStringFormat –
nulluses the default.- Returns:
thisinstance.