public final class StreamUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
StreamUtils.MySplitIterator<T> |
static class |
StreamUtils.StopAfterFailPredicate<T> |
Modifier and Type | Method and Description |
---|---|
static <T> Stream<T> |
takeWhile(Stream<T> stream,
Predicate<T> predicate) |
static <T> Stream<T> |
takeWhilePlusOne(Stream<T> stream,
Predicate<T> predicate) |
static <T> Stream<T> |
takeWhilePlusOneNoEval(Stream<T> stream,
Predicate<T> predicate)
Breaks the stream when the predicate is not met.
Does not evaluate elements after the stream breaks. This method evaluates the stream. |
public static <T> Stream<T> takeWhilePlusOneNoEval(Stream<T> stream, Predicate<T> predicate)
stream
- predicate
- Copyright © 2017. All rights reserved.