com.alkacon.diff
Class TextDiffOutput

java.lang.Object
  extended by com.alkacon.diff.TextDiffOutput
All Implemented Interfaces:
I_DiffOutput

public class TextDiffOutput
extends java.lang.Object
implements I_DiffOutput

Text based implementation for a Diff output.

The generated output will be plain text.


Constructor Summary
TextDiffOutput(java.io.Writer writer, I_TextDiffConfiguration config)
          Creates a new text based diff output.
 
Method Summary
 void addChangedText(java.lang.String text)
          Adds some changed text to this output.
 void addUnchangedText(java.lang.String text)
          Adds some unchanged text to this output.
 void endLine()
          Ends the current output line.
 void skippedLines(int linesSkipped)
          Adds an indicator that some lines have been skipped.
 void startLine(DiffLineType type)
          Starts a new line of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextDiffOutput

public TextDiffOutput(java.io.Writer writer,
                      I_TextDiffConfiguration config)
Creates a new text based diff output.

Parameters:
writer - the writer to write the result to
config - the configuration to use
Method Detail

addChangedText

public void addChangedText(java.lang.String text)
                    throws java.lang.Exception
Description copied from interface: I_DiffOutput
Adds some changed text to this output.

Specified by:
addChangedText in interface I_DiffOutput
Parameters:
text - the changed text to add
Throws:
java.lang.Exception - in case something goes wrong
See Also:
I_DiffOutput.addChangedText(java.lang.String)

addUnchangedText

public void addUnchangedText(java.lang.String text)
                      throws java.lang.Exception
Description copied from interface: I_DiffOutput
Adds some unchanged text to this output.

Specified by:
addUnchangedText in interface I_DiffOutput
Parameters:
text - the unchanged text to add
Throws:
java.lang.Exception - in case something goes wrong
See Also:
I_DiffOutput.addUnchangedText(java.lang.String)

endLine

public void endLine()
             throws java.lang.Exception
Description copied from interface: I_DiffOutput
Ends the current output line.

Specified by:
endLine in interface I_DiffOutput
Throws:
java.lang.Exception - in case something goes wrong
See Also:
I_DiffOutput.endLine()

skippedLines

public void skippedLines(int linesSkipped)
                  throws java.lang.Exception
Description copied from interface: I_DiffOutput
Adds an indicator that some lines have been skipped.

Specified by:
skippedLines in interface I_DiffOutput
Parameters:
linesSkipped - the number of skipped lines
Throws:
java.lang.Exception - in case something goes wrong
See Also:
I_DiffOutput.skippedLines(int)

startLine

public void startLine(DiffLineType type)
               throws java.lang.Exception
Description copied from interface: I_DiffOutput
Starts a new line of the given type.

Specified by:
startLine in interface I_DiffOutput
Parameters:
type - the type of line to add
Throws:
java.lang.Exception - in case something goes wrong
See Also:
I_DiffOutput.startLine(com.alkacon.diff.DiffLineType)


Copyright © 2005-2011. All Rights Reserved.