|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crosswire.common.diff.Match
public class Match
Computes the difference between two texts to create a patch. Applies the
patch onto another text, allowing for errors.
Based on the LGPL Diff_Match_Patch v1.5 javascript of Neil Fraser, Copyright (C) 2006
http://neil.fraser.name/software/diff_match_patch/
The GNU Lesser General Public License for details.| Field Summary | |
|---|---|
private int |
loc
The location in text to focus the search. |
private Locator |
locator
The strategy for locating a best match. |
private String |
pattern
The pattern to find in the text. |
private String |
text
The text to search. |
| Constructor Summary | |
|---|---|
Match()
|
|
Match(String text,
String pattern,
int loc)
Locate the best instance of 'pattern' in 'text' near 'loc'. |
|
| Method Summary | |
|---|---|
int |
locate()
Locate the best instance of 'pattern' in 'text' near 'loc'. |
int |
maxPatternLength()
The maximum length a pattern can be. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private String text
private String pattern
private int loc
private Locator locator
| Constructor Detail |
|---|
public Match()
public Match(String text,
String pattern,
int loc)
text - The text to searchpattern - The pattern to search forloc - The location to search around| Method Detail |
|---|
public int maxPatternLength()
Locator
maxPatternLength in interface Locatorpublic int locate()
locate in interface Locator
|
Copyright ยจ 2003-2015 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||