This commit is contained in:
wumpz
2017-04-03 16:46:15 +02:00
parent 6a70054298
commit eabdafda21
3 changed files with 4 additions and 17 deletions

View File

@@ -19,19 +19,6 @@ limitations under the License.
*/
package difflib.algorithm.myers;
/**
* <p>
* Title: </p>
* <p>
* Description: </p>
* <p>
* Copyright: Copyright (c) 2002</p>
* <p>
* Company: </p>
*
* @author not attributable
* @version 1.0
*/
/**
* A diffnode in a diffpath.
* <p>

View File

@@ -45,7 +45,7 @@ import java.util.List;
* @author <a href="mailto:juanco@suigeneris.org">Juanco Anez</a>
* @param T The type of the compared elements in the 'lines'.
*/
public class MyersDiff<T> implements DiffAlgorithm<T> {
public final class MyersDiff<T> implements DiffAlgorithm<T> {
/**
* Default equalizer.
@@ -117,7 +117,7 @@ public class MyersDiff<T> implements DiffAlgorithm<T> {
* @return A minimum {@link PathNode Path} accross the differences graph.
* @throws DifferentiationFailedException if a diff path could not be found.
*/
public PathNode buildPath(final List<T> orig, final List<T> rev)
private PathNode buildPath(final List<T> orig, final List<T> rev)
throws DifferentiationFailedException {
if (orig == null) {
throw new IllegalArgumentException("original sequence is null");
@@ -192,7 +192,7 @@ public class MyersDiff<T> implements DiffAlgorithm<T> {
* @throws DifferentiationFailedException if a {@link Patch} could not be built from the given
* path.
*/
public Patch<T> buildRevision(PathNode path, List<T> orig, List<T> rev) {
private Patch<T> buildRevision(PathNode path, List<T> orig, List<T> rev) {
if (path == null) {
throw new IllegalArgumentException("path is null");
}

View File

@@ -96,7 +96,7 @@ public abstract class PathNode {
*/
@Override
public String toString() {
StringBuffer buf = new StringBuffer("[");
StringBuilder buf = new StringBuilder("[");
PathNode node = this;
while (node != null) {
buf.append("(");