|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdifflib.Chunk<T>
public class Chunk<T>
Holds the information about the part of text involved in the diff process
Text is represented as Object[] because the diff engine is
capable of handling more than plain ascci. In fact, arrays or lists of any
type that implements hashCode() and
equals() correctly can be subject to
differencing using this library.
| Constructor Summary | |
|---|---|
Chunk(int position,
List<T> lines)
Creates a chunk and saves a copy of affected lines |
|
Chunk(int position,
T[] lines)
Creates a chunk and saves a copy of affected lines |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
List<T> |
getLines()
|
int |
getPosition()
|
int |
hashCode()
|
int |
last()
Returns the index of the last line of the chunk. |
void |
setLines(List<T> lines)
|
int |
size()
|
String |
toString()
|
void |
verify(List<T> target)
Verifies that this chunk's saved text matches the corresponding text in the given sequence. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Chunk(int position,
List<T> lines)
position - the start positionlines - the affected lines
public Chunk(int position,
T[] lines)
position - the start positionlines - the affected lines| Method Detail |
|---|
public void verify(List<T> target)
throws PatchFailedException
target - the sequence to verify against.
PatchFailedExceptionpublic int getPosition()
public void setLines(List<T> lines)
public List<T> getLines()
public int size()
public int last()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||