Class IterableDiff<T>

  • Type Parameters:
    T - the type of element to compare.

    class IterableDiff<T>
    extends Object
    • Method Detail

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

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

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