org.javers.core.diff.DiffBuilder Maven / Gradle / Ivy
package org.javers.core.diff;
import org.javers.common.string.PrettyValuePrinter;
import org.javers.core.commit.CommitMetadata;
import java.util.*;
/**
* @author bartosz walacik
*/
public class DiffBuilder {
private final List changes = new ArrayList<>();
private final PrettyValuePrinter valuePrinter;
public DiffBuilder() {
this(PrettyValuePrinter.getDefault());
}
public DiffBuilder(PrettyValuePrinter valuePrinter) {
this.valuePrinter = valuePrinter;
}
public static Diff empty() {
return new Diff(Collections.emptyList(), PrettyValuePrinter.getDefault());
}
public DiffBuilder addChange(Change change, Optional