当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
LineDiff (NB JUnit) - NetBeans API Javadoc (Current Development Version)
org.netbeans.junit.diff
Class LineDiff
java.lang.Object
org.netbeans.junit.diff.LineDiff
- All Implemented Interfaces:
- Diff
public class LineDiff
- extends Object
- implements Diff
Line Diff with formated textual output.
Number of context lines in output is configurable through system property 'nbjunit.linediff.context'.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONTEXT
public static int CONTEXT
LineDiff
public LineDiff()
LineDiff
public LineDiff(boolean ignoreCase)
LineDiff
public LineDiff(boolean ignoreCase,
boolean ignoreEmptyLines)
getIgnoreCase
public boolean getIgnoreCase()
compareLines
protected boolean compareLines(String l1,
String l2)
- Parameters:
l1
- first line to comparel2
- second line to compare
- Returns:
- true if lines equal
getNContextLines
public int getNContextLines()
diff
public boolean diff(String ref,
String pass,
String diff)
throws IOException
- Specified by:
diff
in interface Diff
- Parameters:
first
- first file to comparesecond
- second file to comparediff
- difference file, caller can pass null value, when results are not needed.
- Returns:
- true iff files differ
- Throws:
IOException
diff
public boolean diff(File refFile,
File passFile,
File diffFile)
throws IOException
- Specified by:
diff
in interface Diff
- Parameters:
refFile
- first file to compare -- refpassFile
- second file to compare -- goldendiffFile
- difference file, caller can pass null value, when results are not needed.
- Returns:
- true iff files differ
- Throws:
IOException