Top Fields Constructors Methods
org.assertj.core.internal

pack-priv Class IterableDiff<T>

extends Object
Class Inheritance
Type Parameters
<T>
the type of element to compare.
Static Imports
java.util.Collections.unmodifiableList, org.assertj.core.util.Lists.newArrayList

Field Summary

Modifier and TypeField and Description
private final ComparisonStrategy
pack-priv List<T>
pack-priv List<T>

Constructor Summary

AccessConstructor and Description
pack-priv
IterableDiff(Iterable<T> actual, Iterable<T> expected, ComparisonStrategy comparisonStrategy)

Method Summary

Modifier and TypeMethod and Description
pack-priv static <T> IterableDiff<T>
diff(Iterable<T> actual, Iterable<T> expected, ComparisonStrategy comparisonStrategy)

pack-priv static <T> IterableDiff<T>
diff(Iterable<T> actual, Iterable<T> expected)

pack-priv boolean
private boolean
isActualElementInExpected(T elementInActual, List<T> copyOfExpected)

private boolean
iterableContains(Iterable<?> actual, T expectedElement)

private void
iterablesRemoveFirst(Iterable<?> actual, T value)

private List<T>
missingActualElements(Iterable<T> actual, Iterable<T> expected)

private List<T>

Returns:

the list of elements in the first iterable that are not in the second, i.e. first - second
unexpectedActualElements
(Iterable<T>
the list we want to subtract from
actual
,
Iterable<T>
the list to subtract
expected
)

Returns the list of elements in the first iterable that are not in the second, i.e. first - second

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

comparisonStrategyback to summary
private final ComparisonStrategy comparisonStrategy
missingback to summary
pack-priv List<T> missing
unexpectedback to summary
pack-priv List<T> unexpected

Constructor Detail

IterableDiffback to summary
pack-priv IterableDiff(Iterable<T> actual, Iterable<T> expected, ComparisonStrategy comparisonStrategy)

Method Detail

diffback to summary
pack-priv static <T> IterableDiff<T> diff(Iterable<T> actual, Iterable<T> expected, ComparisonStrategy comparisonStrategy)
diffback to summary
pack-priv static <T> IterableDiff<T> diff(Iterable<T> actual, Iterable<T> expected)
differencesFoundback to summary
pack-priv boolean differencesFound()
isActualElementInExpectedback to summary
private boolean isActualElementInExpected(T elementInActual, List<T> copyOfExpected)
iterableContainsback to summary
private boolean iterableContains(Iterable<?> actual, T expectedElement)
iterablesRemoveFirstback to summary
private void iterablesRemoveFirst(Iterable<?> actual, T value)
missingActualElementsback to summary
private List<T> missingActualElements(Iterable<T> actual, Iterable<T> expected)
unexpectedActualElementsback to summary
private List<T> unexpectedActualElements(Iterable<T> actual, Iterable<T> expected)

Returns the list of elements in the first iterable that are not in the second, i.e. first - second

Parameters
actual:Iterable<T>

the list we want to subtract from

expected:Iterable<T>

the list to subtract

Returns:List<T>

the list of elements in the first iterable that are not in the second, i.e. first - second