Class NormalizingDiffBuilder<T extends @Nullable Object>

java.lang.Object
org.apache.commons.lang3.builder.DiffBuilder<T>
com.atlassian.crowd.directory.ldap.diff.NormalizingDiffBuilder<T>
Type Parameters:
T - type of top level objects compared
All Implemented Interfaces:
org.apache.commons.lang3.builder.Builder<org.apache.commons.lang3.builder.DiffResult<T>>

public class NormalizingDiffBuilder<T extends @Nullable Object> extends org.apache.commons.lang3.builder.DiffBuilder<T>
Extends org.apache.commons.lang3.builder.DiffBuilder<T extends @Nullable Object> by providing additional methods to append strings and other DiffResult<?>s for nested properties
  • Constructor Summary

    Constructors
    Constructor
    Description
    NormalizingDiffBuilder(T left, T right, org.apache.commons.lang3.builder.ToStringStyle style)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    append(String fieldName, String leftValue, String rightValue)
    Normalizes Strings when appended, by converting "" to null
    appendDiff(String fieldName, org.apache.commons.lang3.builder.DiffResult<?> diffResult)
    This method copies DiffBuilder.append(String, DiffResult), but allows nested diffed objects to be of different type (compared to generic class T)

    Methods inherited from class org.apache.commons.lang3.builder.DiffBuilder

    append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, build

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NormalizingDiffBuilder

      public NormalizingDiffBuilder(T left, T right, org.apache.commons.lang3.builder.ToStringStyle style)
  • Method Details

    • append

      public NormalizingDiffBuilder<T> append(String fieldName, String leftValue, String rightValue)
      Normalizes Strings when appended, by converting "" to null
      Parameters:
      fieldName - field name
      leftValue - left value
      rightValue - right value
      Returns:
      this builder
    • appendDiff

      public NormalizingDiffBuilder<T> appendDiff(String fieldName, org.apache.commons.lang3.builder.DiffResult<?> diffResult)
      This method copies DiffBuilder.append(String, DiffResult), but allows nested diffed objects to be of different type (compared to generic class T)
      Parameters:
      fieldName - field name
      diffResult - diff result
      Returns:
      this builder