eed for null check, as NullPointerException correct if obj is null return new DiffBuilder(this, obj, ToStringStyle.SHORT_PREFIX_STYLE) .append("name", this.name, obj.name) .append("age", this.age, obj.age) .append("smoker", this.smoker, obj.smoker) .build(); } }
The {@code ToStringStyle} passed to the constructor is embedded in thereturned {@code DiffResult} and influences the style of the{@code DiffResult.toString()} method. This style choice can be overridden bycalling {@link DiffResult#toString(ToStringStyle)}.
@since 3.3
@version $Id: DiffBuilder.java 1565245 2014-02-06 13:39:50Z sebb $
@see Diffable
@see Diff
@see DiffResult
@see ToStringStyle