Take elements from a stream while the predicates hold
<pre>
{@code Streams.takeWhile(Stream.of(4,3,6,7).sorted(),i->i<6).collect(CyclopsCollectors.toList());
//[4,3]
}
</pre>
@param stream
@param predicate
@return
495698
public static <U> Stream<U> takeWhile(final Stream<U> stream, final Predicate<? super U> predicate) {
        return StreamSupport.stream(new LimitWhileSpliterator<>(stream.spliterator(), predicate),stream.isParallel());
    }
239800
public static <T> Iterator<T> filteringIterator(
        Iterator<? extends T> iterator, 
        Predicate<? super T> predicate)
    {
        Objects.requireNonNull(iterator, "The iterator is null");
        Objects.requireNonNull(predicate, "The predicate is null");
        return new FilteringIterator<T>(iterator, predicate);
    }
37990
public static <T> T getLast(@javax.annotation.Nonnull final Stream<T> stream) {
    final List<T> collect = stream.collect(Collectors.toList());
    final T last = collect.get(collect.size() - 1);
    return last;
  }
1244979
public Stream<T> filter(Predicate<? super T> predicate) {
        List<T> reduction = new ArrayList<T>();
        while (iterator.hasNext()) {
            final T element = iterator.next();
            if (predicate.test(element)) {
                reduction.add(element);
            }
        }
        return Stream.of(reduction);
    }
67149
public static <T> Predicate<T> predicate(CheckedPredicate<T> predicate) {
        return predicate(predicate, THROWABLE_TO_RUNTIME_EXCEPTION);
    }
195305
public final static <T> Stream<Seq<T>> groupedUntil(final Stream<T> stream, final Predicate<? super T> predicate) {
        return groupedWhile(stream, predicate.negate());
    }
1125278
public static final <A> Collection<A> toLazyCollection(final Stream<A> stream) {
        return SeqUtils.toLazyCollection(stream.iterator());
    }
950391
@Override
    public StreamT<W,T> dropUntil(final Predicate<? super T> p) {

        return (StreamT<W,T>) FoldableTransformerSeq.super.dropUntil(p);
    }
1279742
@Override
	public List<E> collect() {
		try (Stream<E> stream = stream()) {
			return stream.collect(Collectors.toList());
		}
	}
576520
private RunList<R> limit(final CountingPredicate<R> predicate) {
        size = null;
        first = null;
        final Iterable<R> nested = base;
        base = new Iterable<R>() {
            public Iterator<R> iterator() {
                return hudson.util.Iterators.limit(nested.iterator(),predicate);
            }

            @Override
            public String toString() {
                return Iterables.toString(this);
            }
        };
        return this;
    }
1030959
public static <K, V> Stream<Entry<K, V>> getEntryStreamWithFilter(
            Map<K, V> map, Predicate<? super Entry<K, V>> predicate) {
        return buildEntryStream(map).filter(predicate);
    }
29926
public static <K, V> List<V> removeAllIfByEntry(Map<K, V> map,
            Predicate<? super Entry<K, V>> filter) {
        return getEntryStreamWithFilter(map, filter).map(Entry::getKey)
                .collect(toList()).stream().map(map::remove)
                .collect(toList());
    }
17013
public final static <T> Stream<Seq<T>> groupedWhile(final Stream<T> stream, final Predicate<? super T> predicate) {
        return StreamSupport.stream(new GroupedWhileSpliterator<>(stream.spliterator(),()->Seq.of(),Function.identity(),predicate.negate()),stream.isParallel());

    }
1250451
public RunList<R> filter(Predicate<R> predicate) {
        size = null;
        first = null;
        base = Iterables.filter(base,predicate);
        return this;
    }
692138
public static Predicate parse(final String predicate) {
        return PredicateParser.parse(predicate, Thread.currentThread().getContextClassLoader());
    }
17038
public static final <A> Collection<A> toConcurrentLazyCollection(final Stream<A> stream) {
        return toConcurrentLazyCollection(stream.iterator());
    }
710109
@NotNull
    public LongStream filterNot(@NotNull final LongPredicate predicate) {
        return filter(LongPredicate.Util.negate(predicate));
    }