Class ElementsSatisfyingConsumer<E>

java.lang.Object
org.assertj.core.internal.ElementsSatisfyingConsumer<E>
Type Parameters:
E - element type

class ElementsSatisfyingConsumer<E> extends Object
Wrapper for the list of elements that satisfy certain requirements (expressed as a Consumer).
  • Field Details

    • elements

      private final List<E> elements
  • Constructor Details

    • ElementsSatisfyingConsumer

      ElementsSatisfyingConsumer(Iterable<? extends E> actual, Consumer<? super E> assertions)
    • ElementsSatisfyingConsumer

      private ElementsSatisfyingConsumer(List<E> elements)
  • Method Details

    • getElements

      List<E> getElements()
    • withoutElement

      ElementsSatisfyingConsumer<E> withoutElement(E element)
      New ElementsSatisfyingConsumer containing all elements except the (first occurrence of the) given element.

      This instance is not modified.

      Parameters:
      element - the element to remove from the result
      Returns:
      all except the given element
    • filterByPassingAssertions

      private static <E> List<E> filterByPassingAssertions(Iterable<? extends E> actual, Consumer<? super E> assertions)