/** * short-circuiting operation; limits the stream to the first element that fulfills the predicate */ public S limit(Predicate<T> predicate) { // #takeWhile comes with Java >= 9 return supply(StreamEx.of(this).takeWhileInclusive(predicate.negate())); }
/** * short-circuiting operation; limits the stream to the first element that fulfills the predicate */ public S limit(Predicate<T> predicate) { // #takeWhile comes with Java >= 9 return supply(StreamEx.of(this).takeWhileInclusive(predicate.negate())); }