Top Fields Constructors Methods
com.github.difflib.unifieddiff

public Class UnifiedDiffWriter

extends Object
Class Inheritance
Imports
com.github.difflib.patch.AbstractDelta, java.io.IOException, .Writer, java.util.ArrayList, .List, .Objects, java.util.function.Consumer, .Function, java.util.logging.Level, java.util.logging.Logger

Author
Tobias Warneke ([email protected])

Field Summary

Modifier and TypeField and Description
private static final java.util.logging.Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
getDeltaText(Consumer<String>
consumer for the list of String lines of code
writer
,
AbstractDelta<String>
the Delta to output
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)

public static void
write(UnifiedDiff diff, Function<String, List<String>> originalLinesProvider, Writer writer, int contextSize)

public static void
write(UnifiedDiff diff, Function<String, List<String>> originalLinesProvider, Consumer<String> writer, int contextSize)

private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final java.util.logging.Logger LOG

Constructor Detail

UnifiedDiffWriterback to summary
public UnifiedDiffWriter()

Method Detail

getDeltaTextback to summary
private 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.

Parameters
writer:Consumer<String>

consumer for the list of String lines of code

delta:AbstractDelta<String>

the Delta to output

processDeltasback to summary
private static void processDeltas(Consumer<String> writer, List<String> origLines, List<AbstractDelta<String>> deltas, int contextSize, boolean newFile)
writeback to summary
public static void write(UnifiedDiff diff, Function<String, List<String>> originalLinesProvider, Writer writer, int contextSize) throws IOException
writeback to summary
public static void write(UnifiedDiff diff, Function<String, List<String>> originalLinesProvider, Consumer<String> writer, int contextSize) throws IOException
writeOrNothingback to summary
private static void writeOrNothing(Consumer<String> writer, String str) throws IOException