public Stream<T> takeWhile(Predicate<? super T> predicate) {
        requireNonNull(predicate);
        if (predicate.test(element)) {
            return this;
        } else {
            return empty();
        }
    }
Returns, if this stream is ordered, a stream consisting of the longest
prefix of elements taken from this stream that match the given predicate.

@param predicate - a non-interfering, stateless predicate to apply to
elements to determine the longest prefix of elements.
@return the new stream
common-parent/singletonstream/src/main/java/com/speedment/common/singletonstream/SingletonStream.java