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 specializedStream
<VolumeElement
<Volume
,T
>> that is lazily evaluated and backed/populated by the particularVolume
. Much likeStream
, there are intermediary operations that can be performed on the stream, and terminal operations. While aVolume
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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
allMatch(java.util.function.Predicate<VolumeElement<V,? super T>> predicate)
boolean
allMatch(VolumePredicate<V,? super T> predicate)
default boolean
anyMatch(java.util.function.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, java.util.function.Predicate<R> predicate)
long
count()
default VolumeStream<V,T>
filter(java.util.function.Predicate<VolumeElement<V,? super T>> predicate)
VolumeStream<V,T>
filter(VolumePredicate<V,T> predicate)
java.util.Optional<VolumeElement<V,T>>
findAny()
java.util.Optional<VolumeElement<V,T>>
findFirst()
default VolumeStream<V,java.util.Optional<? extends T>>
flatMap(java.util.function.Function<VolumeElement<V,T>,java.util.Optional<? extends T>> mapper)
VolumeStream<V,java.util.Optional<? extends T>>
flatMap(VolumeFlatMapper<V,T> mapper)
default void
forEach(java.util.function.Consumer<VolumeElement<V,T>> consumer)
void
forEach(VolumeConsumer<V,T> visitor)
default <Out> VolumeStream<V,Out>
map(java.util.function.Function<VolumeElement<V,T>,? extends Out> mapper)
<Out> VolumeStream<V,Out>
map(VolumeMapper<V,T,Out> mapper)
default boolean
noneMatch(java.util.function.Predicate<VolumeElement<V,? super T>> predicate)
boolean
noneMatch(VolumePredicate<V,? super T> predicate)
java.util.stream.Stream<VolumeElement<V,T>>
toStream()
VolumeStream<V,T>
transform(VolumePositionTranslator<V,T> transformer)
V
volume()
-
-
-
Method Detail
-
volume
V volume()
-
filter
VolumeStream<V,T> filter(VolumePredicate<V,T> predicate)
-
filter
default VolumeStream<V,T> filter(java.util.function.Predicate<VolumeElement<V,? super T>> predicate)
-
map
<Out> VolumeStream<V,Out> map(VolumeMapper<V,T,Out> mapper)
-
map
default <Out> VolumeStream<V,Out> map(java.util.function.Function<VolumeElement<V,T>,? extends Out> mapper)
-
flatMap
VolumeStream<V,java.util.Optional<? extends T>> flatMap(VolumeFlatMapper<V,T> mapper)
-
flatMap
default VolumeStream<V,java.util.Optional<? extends T>> flatMap(java.util.function.Function<VolumeElement<V,T>,java.util.Optional<? extends T>> mapper)
-
transform
VolumeStream<V,T> transform(VolumePositionTranslator<V,T> transformer)
-
count
long count()
-
allMatch
boolean allMatch(VolumePredicate<V,? super T> predicate)
-
allMatch
default boolean allMatch(java.util.function.Predicate<VolumeElement<V,? super T>> predicate)
-
noneMatch
boolean noneMatch(VolumePredicate<V,? super T> predicate)
-
noneMatch
default boolean noneMatch(java.util.function.Predicate<VolumeElement<V,? super T>> predicate)
-
anyMatch
boolean anyMatch(VolumePredicate<V,? super T> predicate)
-
anyMatch
default boolean anyMatch(java.util.function.Predicate<VolumeElement<V,? super T>> predicate)
-
findFirst
java.util.Optional<VolumeElement<V,T>> findFirst()
-
findAny
java.util.Optional<VolumeElement<V,T>> findAny()
-
toStream
java.util.stream.Stream<VolumeElement<V,T>> toStream()
-
apply
default <W extends MutableVolume> void apply(VolumeCollector<W,T,?> collector)
-
applyUntil
<W extends MutableVolume,R> void applyUntil(VolumeCollector<W,T,R> collector, java.util.function.Predicate<R> predicate)
-
forEach
void forEach(VolumeConsumer<V,T> visitor)
-
forEach
default void forEach(java.util.function.Consumer<VolumeElement<V,T>> consumer)
-
-