public class LineMap extends Object
The GNU Lesser General Public License for details.
Modifier and Type | Field and Description |
---|---|
private List<String> |
lines
The lines from the original.
|
private String |
sourceMap
Each character in sourceMap provides an integer representation of the
line in the original.
|
private String |
targetMap
Each character in sourceMap provides an integer representation of the
line in the original.
|
Constructor and Description |
---|
LineMap(String source,
String target)
Split two texts into a list of strings.
|
Modifier and Type | Method and Description |
---|---|
List<String> |
getLines() |
String |
getSourceMap() |
String |
getTargetMap() |
private String |
linesToCharsMunge(String text,
List<String> linearray,
Map<String,Integer> linehash)
Split a text into a list of strings.
|
void |
restore(List<?> diffs)
Rehydrate the text in a diff from a string of line hashes to real lines
of text.
|
private String sourceMap
private String targetMap
public void restore(List<?> diffs)
diffs
- List of Difference objectspublic String getSourceMap()
public String getTargetMap()
private String linesToCharsMunge(String text, List<String> linearray, Map<String,Integer> linehash)
text
- String to encodelinearray
- List of unique stringslinehash
- Map of strings to indices