org.eclipse.compare.StringComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docx4j-diffx Show documentation
Show all versions of docx4j-diffx Show documentation
differencing of docx files
package org.eclipse.compare;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.compare.internal.LCSSettings;
import org.eclipse.compare.rangedifferencer.IRangeComparator;
import org.eclipse.compare.rangedifferencer.RangeDifference;
import org.eclipse.compare.rangedifferencer.RangeDifferencer;
/**
* A comparator that compares strings.
*/
public class StringComparator implements IRangeComparator {
private List leafs = new ArrayList();
public StringComparator(String paragraphContent) {
String[] result = paragraphContent.split("\\s");
for (int x=0; x