Package org.assertj.core.internal
Class IterableDiff<T>
- java.lang.Object
-
- org.assertj.core.internal.IterableDiff<T>
-
- Type Parameters:
T
- the type of element to compare.
class IterableDiff<T> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description private ComparisonStrategy
comparisonStrategy
(package private) List<T>
missing
(package private) List<T>
unexpected
-
Constructor Summary
Constructors Constructor Description IterableDiff(Iterable<T> actual, Iterable<T> expected, ComparisonStrategy comparisonStrategy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static <T> IterableDiff<T>
diff(Iterable<T> actual, Iterable<T> expected)
(package private) static <T> IterableDiff<T>
diff(Iterable<T> actual, Iterable<T> expected, ComparisonStrategy comparisonStrategy)
(package private) boolean
differencesFound()
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>
unexpectedActualElements(Iterable<T> actual, Iterable<T> expected)
Returns the list of elements in the first iterable that are not in the second, i.e.
-
-
-
Field Detail
-
comparisonStrategy
private final ComparisonStrategy comparisonStrategy
-
-
Constructor Detail
-
IterableDiff
IterableDiff(Iterable<T> actual, Iterable<T> expected, ComparisonStrategy comparisonStrategy)
-
-
Method Detail
-
diff
static <T> IterableDiff<T> diff(Iterable<T> actual, Iterable<T> expected, ComparisonStrategy comparisonStrategy)
-
diff
static <T> IterableDiff<T> diff(Iterable<T> actual, Iterable<T> expected)
-
differencesFound
boolean differencesFound()
-
unexpectedActualElements
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
- the list we want to subtract fromexpected
- the list to subtract- Returns:
- the list of elements in the first iterable that are not in the second, i.e. first - second
-
isActualElementInExpected
private boolean isActualElementInExpected(T elementInActual, List<T> copyOfExpected)
-
missingActualElements
private List<T> missingActualElements(Iterable<T> actual, Iterable<T> expected)
-
-