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.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public List | |
| public int | |
| public int | |
| public int | Returns: the index of the last line of the chunk.Returns the index of the last line of the chunk. |
| public int | |
| public String | |
| public void |
| lines | back to summary |
|---|---|
| private List<T> lines | |
| position | back to summary |
|---|---|
| private final int position | |
| Chunk | back to summary |
|---|---|
| public Chunk(int position, List<T> lines) Creates a chunk and saves a copy of affected lines
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getLines | back to summary |
|---|---|
public List
| |
| getPosition | back to summary |
|---|---|
public int getPosition()
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| last | back to summary |
|---|---|
| public int last() Returns the index of the last line of the chunk.
| |
| size | back to summary |
|---|---|
| public int size() Return the chunk size
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| verify | back to summary |
|---|---|
| public void verify(List<T> target) throws IllegalStateException Verifies that this chunk's saved text matches the corresponding text in the given sequence.
| |