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 java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private ComparisonStrategy
comparisonStrategy
(package private) java.util.List<T>
missing
(package private) java.util.List<T>
unexpected
-
Constructor Summary
Constructors Constructor Description IterableDiff(java.lang.Iterable<T> actual, java.lang.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(java.lang.Iterable<T> actual, java.lang.Iterable<T> expected)
(package private) static <T> IterableDiff<T>
diff(java.lang.Iterable<T> actual, java.lang.Iterable<T> expected, ComparisonStrategy comparisonStrategy)
(package private) boolean
differencesFound()
private boolean
isActualElementInExpected(T elementInActual, java.util.List<T> copyOfExpected)
private boolean
iterableContains(java.lang.Iterable<?> actual, T expectedElement)
private void
iterablesRemoveFirst(java.lang.Iterable<?> actual, T value)
private java.util.List<T>
missingActualElements(java.lang.Iterable<T> actual, java.lang.Iterable<T> expected)
private java.util.List<T>
unexpectedActualElements(java.lang.Iterable<T> actual, java.lang.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
-
unexpected
java.util.List<T> unexpected
-
missing
java.util.List<T> missing
-
-
Constructor Detail
-
IterableDiff
IterableDiff(java.lang.Iterable<T> actual, java.lang.Iterable<T> expected, ComparisonStrategy comparisonStrategy)
-
-
Method Detail
-
diff
static <T> IterableDiff<T> diff(java.lang.Iterable<T> actual, java.lang.Iterable<T> expected, ComparisonStrategy comparisonStrategy)
-
diff
static <T> IterableDiff<T> diff(java.lang.Iterable<T> actual, java.lang.Iterable<T> expected)
-
differencesFound
boolean differencesFound()
-
unexpectedActualElements
private java.util.List<T> unexpectedActualElements(java.lang.Iterable<T> actual, java.lang.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, java.util.List<T> copyOfExpected)
-
missingActualElements
private java.util.List<T> missingActualElements(java.lang.Iterable<T> actual, java.lang.Iterable<T> expected)
-
iterableContains
private boolean iterableContains(java.lang.Iterable<?> actual, T expectedElement)
-
iterablesRemoveFirst
private void iterablesRemoveFirst(java.lang.Iterable<?> actual, T value)
-
-