Package org.assertj.core.internal
Class ElementsSatisfyingConsumer<E>
- java.lang.Object
-
- org.assertj.core.internal.ElementsSatisfyingConsumer<E>
-
- Type Parameters:
E
- element type
class ElementsSatisfyingConsumer<E> extends java.lang.Object
Wrapper for the list of elements that satisfy certain requirements (expressed as aConsumer
).
-
-
Constructor Summary
Constructors Modifier Constructor Description (package private)
ElementsSatisfyingConsumer(java.lang.Iterable<? extends E> actual, java.util.function.Consumer<? super E> assertions)
private
ElementsSatisfyingConsumer(java.util.List<E> elements)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static <E> java.util.List<E>
filterByPassingAssertions(java.lang.Iterable<? extends E> actual, java.util.function.Consumer<? super E> assertions)
(package private) java.util.List<E>
getElements()
private static void
removeFirstReference(java.lang.Object element, java.util.List<?> elements)
(package private) ElementsSatisfyingConsumer<E>
withoutElement(E element)
NewElementsSatisfyingConsumer
containing all elements except the first occurrence of the given element.
-
-
-
Field Detail
-
elements
private final java.util.List<E> elements
-
-
Method Detail
-
filterByPassingAssertions
private static <E> java.util.List<E> filterByPassingAssertions(java.lang.Iterable<? extends E> actual, java.util.function.Consumer<? super E> assertions)
-
getElements
java.util.List<E> getElements()
-
withoutElement
ElementsSatisfyingConsumer<E> withoutElement(E element)
NewElementsSatisfyingConsumer
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
-
removeFirstReference
private static void removeFirstReference(java.lang.Object element, java.util.List<?> elements)
-
-