com.finalist.util
Class DiffConflictLine

java.lang.Object
  extended bycom.finalist.util.DiffConflictLine

public class DiffConflictLine
extends java.lang.Object

This class represents a line of text from a source file that conflicted during the diff process.

Author:
Michael O'Connor - Finalist IT Group.

Field Summary
static DiffConflictLine EOF
          A special case of DiffConflictLine, used to represent the last line in a file.
 
Constructor Summary
DiffConflictLine(boolean firstFile, int number, java.lang.String line)
          Constructs a DiffConflictLine.
 
Method Summary
 java.lang.String getLine()
           
 int getLineNumber()
           
 boolean isEof()
           
 boolean isFirstFile()
           
 boolean lineEquals(DiffConflictLine line2)
          Checks if the given line has the same text as this one (ignoring whitespace).
 boolean precedes(DiffConflictLine next)
          Checks if a given conflict line precedes this one.
 java.lang.String toString()
          By default this renders a HTML result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EOF

public static final DiffConflictLine EOF
A special case of DiffConflictLine, used to represent the last line in a file.

Constructor Detail

DiffConflictLine

public DiffConflictLine(boolean firstFile,
                        int number,
                        java.lang.String line)
Constructs a DiffConflictLine.

Parameters:
firstFile - true if this line comes from the 'first' file (a diff involves 2 files).
number - the line number within the original file.
line - the text of the line.
Method Detail

lineEquals

public boolean lineEquals(DiffConflictLine line2)
Checks if the given line has the same text as this one (ignoring whitespace).

Parameters:
line2 - the other line.
Returns:
true if equal.

getLine

public java.lang.String getLine()

isEof

public boolean isEof()

getLineNumber

public int getLineNumber()

isFirstFile

public boolean isFirstFile()

toString

public java.lang.String toString()
By default this renders a HTML result.

Returns:

precedes

public boolean precedes(DiffConflictLine next)
Checks if a given conflict line precedes this one.

Parameters:
next -
Returns:


Copyright © 2003-2005 SourceForge. All Rights Reserved.