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 Details

  • Constructor Details

  • Method Details

    • 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 from
      expected - 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)
    • iterableContains

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

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