public interface MeasuredStream<T,V extends Stats> extends Stream<T>
Modifier and Type | Method and Description |
---|---|
MeasuredStream<T,V> |
filter(Predicate<T> predicate)
Filter elements out of the stream which do not match the supplied predicate.
|
V |
getStats() |
MeasuredStream<T,V> |
limit(long maxSize)
Limit the number of elements returned by the stream.
|
<R> MeasuredStream<R,V> |
transform(Transformer<T,R> transformer)
Transform the stream in an arbitrary way.
|
asIterator, close, forEach, next
V getStats()
next()
may change the value of the returned stats. This change
may or may not be reflected in the stats returned, depending on the implementation.<R> MeasuredStream<R,V> transform(Transformer<T,R> transformer)
Stream
next()
is called.
The returned Stream is also Autocloseable; closing the returned Stream should also close this stream. This is to simplify close-handling.
MeasuredStream<T,V> filter(Predicate<T> predicate)
Stream
MeasuredStream<T,V> limit(long maxSize)
Stream