Class DiffUtils

java.lang.Object
google.registry.util.DiffUtils

public final class DiffUtils extends Object
Helper class for diff utilities.
  • Method Details

    • prettyPrintEntityDeepDiff

      public static String prettyPrintEntityDeepDiff(Map<?,?> a, Map<?,?> b)
      Pretty-prints a deep diff between two maps that represent entities.
    • prettyPrintXmlDeepDiff

      public static String prettyPrintXmlDeepDiff(Map<?,?> a, Map<?,?> b, @Nullable String path)
      Pretty-prints a deep diff between two maps that represent XML documents. Path is prefixed to each output line of the diff.
    • deepDiff

      public static com.google.common.collect.ImmutableMap<?,?> deepDiff(Map<?,?> a, Map<?,?> b, boolean ignoreNullToCollection)
      Compare two maps and return a map containing, at each key where they differed, both values.
    • prettyPrintDiffedMap

      public static String prettyPrintDiffedMap(Map<?,?> map, @Nullable String path)
      Recursively pretty prints the contents of a diffed map generated by deepDiff(java.util.Map<?, ?>, java.util.Map<?, ?>, boolean).