Interface VolumeStream<V extends Volume,T>
- Type Parameters:
V
- The type of volume backing this StreamT
- The type of element being iterated on
public interface VolumeStream<V extends Volume,T>
A specialized
Stream
<VolumeElement
<Volume
, T
>>
that is lazily evaluated and backed/populated by the particular Volume
. Much like
Stream
, there are intermediary operations that can be performed on the stream,
and terminal operations. While a Volume
has many applications, on occasion work
is requested to be performed in "bulk" or given a specific "work area".
Intermediary Operations
These operations are performed on each individual VolumeElement
<Volume
,
T
> such that either the element is inspected or filtering can be performed.
They are as follows:
filter(VolumePredicate)
filter(Predicate)
map(VolumeMapper<V, T>)
map(Function<VolumeElement<V, T>>)
Terminal Operations
These operations are consuming the entirety of the stream, after all intermediary operations are performed on elements, perhaps filtering, or perhaps supplying different instances as "replacements". TODO flesh out the description of VolumeStream
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
allMatch
(Predicate<VolumeElement<V, ? super T>> predicate) boolean
allMatch
(VolumePredicate<V, ? super T> predicate) default boolean
anyMatch
(Predicate<VolumeElement<V, ? super T>> predicate) boolean
anyMatch
(VolumePredicate<V, ? super T> predicate) default <W extends MutableVolume>
voidapply
(VolumeCollector<W, T, ?> collector) <W extends MutableVolume,
R>
voidapplyUntil
(VolumeCollector<W, T, R> collector, Predicate<R> predicate) long
count()
default VolumeStream
<V, T> filter
(Predicate<VolumeElement<V, ? super T>> predicate) filter
(VolumePredicate<V, T> predicate) findAny()
default VolumeStream
<V, Optional<? extends T>> VolumeStream
<V, Optional<? extends T>> flatMap
(VolumeFlatMapper<V, T> mapper) default void
forEach
(Consumer<VolumeElement<V, T>> consumer) void
forEach
(VolumeConsumer<V, T> visitor) default <Out> VolumeStream
<V, Out> map
(Function<VolumeElement<V, T>, ? extends Out> mapper) <Out> VolumeStream
<V, Out> map
(VolumeMapper<V, T, Out> mapper) default boolean
noneMatch
(Predicate<VolumeElement<V, ? super T>> predicate) boolean
noneMatch
(VolumePredicate<V, ? super T> predicate) toStream()
transform
(VolumePositionTranslator<V, T> transformer) volume()
-
Method Details
-
volume
V volume() -
filter
-
filter
-
map
-
map
-
flatMap
-
flatMap
default VolumeStream<V,Optional<? extends T>> flatMap(Function<VolumeElement<V, T>, Optional<? extends T>> mapper) -
transform
-
count
long count() -
allMatch
-
allMatch
-
noneMatch
-
noneMatch
-
anyMatch
-
anyMatch
-
findFirst
Optional<VolumeElement<V,T>> findFirst() -
findAny
Optional<VolumeElement<V,T>> findAny() -
toStream
Stream<VolumeElement<V,T>> toStream() -
apply
-
applyUntil
<W extends MutableVolume,R> void applyUntil(VolumeCollector<W, T, R> collector, Predicate<R> predicate) -
forEach
-
forEach
-