@PSOperatorWrapper public class Limiters extends java.lang.Object
| Constructor and Description |
|---|
Limiters() |
| Modifier and Type | Method and Description |
|---|---|
static PStreamTransformation |
limit(Function<Item,java.lang.Boolean> predicate)
Limit the stream with a predicate.
|
static PStreamTransformation |
limitCount(int countLimit)
Limit the stream to at most n items.
|
static PStreamTransformation |
timeout(long timeoutMillis)
Limit the stream with a timeout.
|
public static PStreamTransformation timeout(long timeoutMillis)
timeoutMillis - the timeout milliseconds.public static PStreamTransformation limitCount(int countLimit)
countLimit - the maximum number of items.public static PStreamTransformation limit(Function<Item,java.lang.Boolean> predicate)
predicate - the predicate to check for each item.