Top Description Fields Constructors Methods
org.assertj.core.util.diff

public Class DeleteDelta<T>

extends Delta<T>
Class Inheritance
Type Parameters
<T>
The type of the compared elements in the 'lines'.
Imports
java.util.List

Initially copied from https://code.google.com/p/java-diff-utils/.

Describes the delete-delta between original and revised texts.

Author
Dmitry Naumenko

Field Summary

Inherited from org.assertj.core.util.diff.Delta:
DEFAULT_ENDDEFAULT_START

Constructor Summary

AccessConstructor and Description
public
DeleteDelta(Chunk<T>
The original chunk. Must not be null.
original
,
Chunk<T>
The original chunk. Must not be null.
revised
)

Creates a change delta with the two given chunks.

Method Summary

Modifier and TypeMethod and Description
public void
applyTo(List<T>
the given target
target
)

Implements abstract org.assertj.core.util.diff.Delta.applyTo.

Applies this delta as the patch for a given target
public Delta.TYPE
getType()

Implements abstract org.assertj.core.util.diff.Delta.getType.

Returns the type of delta
public void
verify(List<T>
the text to patch.
target
)

Implements abstract org.assertj.core.util.diff.Delta.verify.

Verifies that this delta can be used to patch the given text.
Inherited from org.assertj.core.util.diff.Delta:
equalsgetOriginalgetRevisedhashCodelineNumbertoString

Constructor Detail

DeleteDeltaback to summary
public DeleteDelta(Chunk<T> original, Chunk<T> revised)

Creates a change delta with the two given chunks.

Parameters
original:Chunk<T>

The original chunk. Must not be null.

revised:Chunk<T>

The original chunk. Must not be null.

Method Detail

applyToback to summary
public void applyTo(List<T> target) throws IllegalStateException

Implements abstract org.assertj.core.util.diff.Delta.applyTo.

Doc from org.assertj.core.util.diff.Delta.applyTo.

Applies this delta as the patch for a given target

Parameters
target:List<T>

the given target

Annotations
@Override
Exceptions
IllegalStateException:
if verify(List) fails
getTypeback to summary
public Delta.TYPE getType()

Implements abstract org.assertj.core.util.diff.Delta.getType.

Doc from org.assertj.core.util.diff.Delta.getType.

Returns the type of delta

Returns:Delta.TYPE

the type enum

Annotations
@Override
verifyback to summary
public void verify(List<T> target) throws IllegalStateException

Implements abstract org.assertj.core.util.diff.Delta.verify.

Doc from org.assertj.core.util.diff.Delta.verify.

Verifies that this delta can be used to patch the given text.

Parameters
target:List<T>

the text to patch.

Annotations
@Override
Exceptions
IllegalStateException:
if the patch cannot be applied.