Top Description Fields Constructors Methods
org.assertj.core.internal

pack-priv Class ElementsSatisfyingConsumer<E>

extends Object
Class Inheritance
Type Parameters
<E>
element type
Static Imports
java.util.stream.Collectors.toList, .IntStream.range, org.assertj.core.internal.Iterables.byPassingAssertions, org.assertj.core.util.Streams.stream

Wrapper for the list of elements that satisfy certain requirements (expressed as a Consumer).
Author
Michael Grafl

Field Summary

Modifier and TypeField and Description
private final List<E>

Constructor Summary

AccessConstructor and Description
pack-priv
ElementsSatisfyingConsumer(Iterable<? extends E> actual, Consumer<? super E> assertions)

private

Method Summary

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

pack-priv List<E>
private static void
removeFirstReference(Object element, List<?> elements)

pack-priv ElementsSatisfyingConsumer<E>

Returns:

all except the given element
withoutElement
(E
the element to remove from the result
element
)

New ElementsSatisfyingConsumer containing all elements except the first occurrence of the given element.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

elementsback to summary
private final List<E> elements

Constructor Detail

ElementsSatisfyingConsumerback to summary
pack-priv ElementsSatisfyingConsumer(Iterable<? extends E> actual, Consumer<? super E> assertions)
ElementsSatisfyingConsumerback to summary
private ElementsSatisfyingConsumer(List<E> elements)

Method Detail

filterByPassingAssertionsback to summary
private static <E> List<E> filterByPassingAssertions(Iterable<? extends E> actual, Consumer<? super E> assertions)
getElementsback to summary
pack-priv List<E> getElements()
removeFirstReferenceback to summary
private static void removeFirstReference(Object element, List<?> elements)
withoutElementback to summary
pack-priv 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:E

the element to remove from the result

Returns:ElementsSatisfyingConsumer<E>

all except the given element