T
- The type of the compared elements in the 'lines'.public class Chunk<T> extends Object
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 and Description |
---|
Chunk(int position,
List<T> lines)
Creates a chunk and saves a copy of affected lines
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
List<T> |
getLines() |
int |
getPosition() |
int |
hashCode() |
int |
last()
Returns the index of the last line of the chunk.
|
int |
size()
Return the chunk size
|
String |
toString() |
void |
verify(List<T> target)
Verifies that this chunk's saved text matches the corresponding text in
the given sequence.
|
public void verify(List<T> target) throws IllegalStateException
target
- the sequence to verify against.IllegalStateException
public int getPosition()
public int size()
public int last()
Copyright © 2014–2019 AssertJ. All rights reserved.