T
- The type of the compared elements in the 'lines'.public class DeleteDelta<T> extends Delta<T>
Describes the delete-delta between original and revised texts.
Delta.TYPE
DEFAULT_END, DEFAULT_START
Constructor and Description |
---|
DeleteDelta(Chunk<T> original,
Chunk<T> revised)
Creates a change delta with the two given chunks.
|
Modifier and Type | Method and Description |
---|---|
void |
applyTo(List<T> target)
Applies this delta as the patch for a given target
|
Delta.TYPE |
getType()
Returns the type of delta
|
void |
verify(List<T> target)
Verifies that this delta can be used to patch the given text.
|
equals, getOriginal, getRevised, hashCode, lineNumber, toString
public void applyTo(List<T> target) throws IllegalStateException
applyTo
in class Delta<T>
target
- the given targetIllegalStateException
- if Delta.verify(List)
failspublic Delta.TYPE getType()
Delta
public void verify(List<T> target) throws IllegalStateException
Delta
verify
in class Delta<T>
target
- the text to patch.IllegalStateException
- if the patch cannot be applied.Copyright © 2014–2019 AssertJ. All rights reserved.