Package org.assertj.core.util.diff
Class DeleteDelta<T>
java.lang.Object
org.assertj.core.util.diff.Delta<T>
org.assertj.core.util.diff.DeleteDelta<T>
- Type Parameters:
T
- The type of the compared elements in the 'lines'.
Initially copied from https://code.google.com/p/java-diff-utils/.
Describes the delete-delta between original and revised texts.
- Author:
- Dmitry Naumenko
-
Nested Class Summary
Nested classes/interfaces inherited from class org.assertj.core.util.diff.Delta
Delta.TYPE
-
Field Summary
Fields inherited from class org.assertj.core.util.diff.Delta
DEFAULT_END, DEFAULT_START
-
Constructor Summary
ConstructorDescriptionDeleteDelta
(Chunk<T> original, Chunk<T> revised) Creates a change delta with the two given chunks. -
Method Summary
Methods inherited from class org.assertj.core.util.diff.Delta
equals, getOriginal, getRevised, hashCode, lineNumber, toString
-
Constructor Details
-
DeleteDelta
Creates a change delta with the two given chunks.- Parameters:
original
- The original chunk. Must not benull
.revised
- The original chunk. Must not benull
.
-
-
Method Details
-
applyTo
Applies this delta as the patch for a given target- Specified by:
applyTo
in classDelta<T>
- Parameters:
target
- the given target- Throws:
IllegalStateException
- ifDelta.verify(List)
fails
-
getType
Description copied from class:Delta
Returns the type of delta -
verify
Description copied from class:Delta
Verifies that this delta can be used to patch the given text.- Specified by:
verify
in classDelta<T>
- Parameters:
target
- the text to patch.- Throws:
IllegalStateException
- if the patch cannot be applied.
-