Interface Streamer<E>
- Type Parameters:
E- The type of contained elements.
- All Superinterfaces:
Streamable<E>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a
Streamable type that provides a kind of builder pattern.-
Method Summary
Modifier and TypeMethodDescriptionReturns a concatenatedStreamerwhose elements are all the elements of this followed by the given element.addAll(Streamable<X> other) static <E> Streamer<E>by(Streamable<E> streamable) Returns aStreamerbacked by a givenStreamable.static <E,F extends E, G extends E>
Streamer<E>concat(Streamable<F> left, Streamable<G> right) Returns a concatenatedStreamerwhose elements are all the elements of the left argument followed by all the elements of the right argument.static <E> Streamer<E>empty()static <E> Streamer<E>of(E element) Returns aStreamerthat contains a single given element.static <E> Streamer<E>of(E[] elements) Returns aStreamerbacked by an array of elements.static <E> Streamer<E>of(E element0, E element1, E... more) Returns aStreamerthat contains two or more given elements.static <E> Streamer<E>Returns aStreamerconsisting of the elements of this but not the given candidate.removeAll(Streamable<X> other) retainAll(Streamable<X> other) Methods inherited from interface de.team33.patterns.streamable.galatea.Streamable
contains, containsAll, containsAll, containsAny, containsAny, containsAny, forEach, isEmpty, stream
-
Method Details
-
empty
- Type Parameters:
E- The type of virtually contained elements.
-
of
Returns aStreamerthat contains a single given element.- Type Parameters:
E- The type of the contained element.
-
of
Returns aStreamerthat contains two or more given elements.- Type Parameters:
E- The type of the contained elements.
-
of
Returns aStreamerbacked by an array of elements.- Type Parameters:
E- The type of the contained elements.
-
of
- Type Parameters:
E- The type of the contained elements.
-
by
Returns aStreamerbacked by a givenStreamable.- Type Parameters:
E- The type of the contained elements.
-
concat
Returns a concatenatedStreamerwhose elements are all the elements of the left argument followed by all the elements of the right argument. The result has a streaming order if both of the arguments have a streaming order.- Type Parameters:
E- The element type of the resultingStreamer.F- The element type of the left argument.G- The element type of the right argument.- Throws:
NullPointerException- if one of the arguments isnull.
-
add
Returns a concatenatedStreamerwhose elements are all the elements of this followed by the given element. The result has a streaming order if this has a streaming order. -
addAll
Returns a concatenatedStreamerwhose elements are all the elements of this followed by all the elements of the otherStreamer. The result has a streaming order if both, this and other, have a streaming order.- Type Parameters:
X- The element type of the otherStreamer.- Throws:
NullPointerException- if other isnull.
-
remove
Returns aStreamerconsisting of the elements of this but not the given candidate. -
removeAll
- Throws:
NullPointerException- if the specified otherStreamerisnull.
-
removeIf
- Throws:
NullPointerException- if the specified condition isnull.
-
retainAll
- Throws:
NullPointerException- if the specified otherStreamerisnull.
-
retainIf
- Throws:
NullPointerException- if the specified condition isnull.
-