|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object patch.Chunk
class Chunk
This Library implements a simple patch algorithm which is able to process the output of diff in normal format. This class implements an immutable data structure that is used to store the modification chunks. A Chunk is a consecutive amount of changes. See the diff documentation for more information. see http://www.gnu.org/software/diffutils/manual/html_mono/diff.html#Normal
Copyright (c) 2007 Dominik Schulz This file is part of jPatchLib. jPatchLib is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. jPatchLib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with jPatchLib; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Field Summary | |
---|---|
private int |
from1
Beginning of this change in the first file. |
private int |
from2
End of this change in the first file. |
private char |
op
What does this chunk do? |
private java.lang.String[] |
patch
The old text. |
private java.lang.String[] |
target
The new text. |
private int |
to1
Beginning of this change in the second file. |
private int |
to2
End of this change in the second file. |
Constructor Summary | |
---|---|
Chunk(char op,
int from1,
int from2,
int to1,
int to2,
java.lang.String[] patch,
java.lang.String[] target)
Create a new chunk. |
Method Summary | |
---|---|
int |
getFrom1()
|
int |
getFrom2()
|
(package private) java.lang.String |
getName()
|
char |
getOp()
|
java.lang.String[] |
getPatch()
|
java.lang.String[] |
getTarget()
|
int |
getTo1()
|
int |
getTo2()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final char op
private final int from1
private final int from2
private final int to1
private final int to2
private final java.lang.String[] patch
private final java.lang.String[] target
Constructor Detail |
---|
public Chunk(char op, int from1, int from2, int to1, int to2, java.lang.String[] patch, java.lang.String[] target)
op
- a (add), d (delete) or c (change).from1
- from2
- to1
- to2
- patch
- target
- Method Detail |
---|
java.lang.String getName()
public int getFrom1()
public int getFrom2()
public char getOp()
public java.lang.String[] getPatch()
public java.lang.String[] getTarget()
public int getTo1()
public int getTo2()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |