static final class Streams.LimitedStream<T> extends ForwardingStream<T>
delegate
Constructor and Description |
---|
LimitedStream(Stream<T> stream,
long maxSize) |
Modifier and Type | Method and Description |
---|---|
T |
next() |
close
asIterator, filter, forEach, limit, transform
public T next() throws StreamException
next
in interface Stream<T>
next
in class ForwardingStream<T>
null
if no such element exists.StreamException
- if something breaks during the next() call.