Package com.github.difflib.unifieddiff
Class UnifiedDiffWriter
java.lang.Object
com.github.difflib.unifieddiff.UnifiedDiffWriter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
getDeltaText
(Consumer<String> writer, AbstractDelta<String> delta) getDeltaText returns the lines to be added to the Unified Diff text from the Delta parameter.private static void
processDeltas
(Consumer<String> writer, List<String> origLines, List<AbstractDelta<String>> deltas, int contextSize, boolean newFile) static void
write
(UnifiedDiff diff, Function<String, List<String>> originalLinesProvider, Writer writer, int contextSize) static void
write
(UnifiedDiff diff, Function<String, List<String>> originalLinesProvider, Consumer<String> writer, int contextSize) private static void
writeOrNothing
(Consumer<String> writer, String str)
-
Field Details
-
LOG
-
-
Constructor Details
-
UnifiedDiffWriter
public UnifiedDiffWriter()
-
-
Method Details
-
write
public static void write(UnifiedDiff diff, Function<String, List<String>> originalLinesProvider, Writer writer, int contextSize) throws IOException- Throws:
IOException
-
write
public static void write(UnifiedDiff diff, Function<String, List<String>> originalLinesProvider, Consumer<String> writer, int contextSize) throws IOException- Throws:
IOException
-
processDeltas
-
getDeltaText
getDeltaText returns the lines to be added to the Unified Diff text from the Delta parameter.- Parameters:
writer
- consumer for the list of String lines of codedelta
- the Delta to output
-
writeOrNothing
- Throws:
IOException
-