@Test public void testSplitAt() { assertEquals(Arrays.asList(), Streams.splitAt(Stream.of(),0)._1().collect(Collectors.toList())); assertEquals(asList(), Streams.splitAt(Stream.of(),0)._2().collect(Collectors.toList())); assertEquals(Arrays.asList(1), Streams.splitAt(Stream.of(1,2),1)._1().collect(Collectors.toList())); }
public final static <T> Tuple2<Stream<T>, Stream<T>> splitAt(final Stream<T> stream, final int where) { final Tuple2<Stream<T>, Stream<T>> Tuple2 = duplicate(stream); return Tuple.tuple( Tuple2._1().limit(where), Tuple2._2().skip(where)); }
Streams { public final static <T> Tuple2<Stream<T>, Stream<T>> splitAt(final Stream<T> stream, final int where) { final Tuple2<Stream<T>, Stream<T>> Tuple2 = duplicate(stream); return Tuple.tuple( Tuple2._1().limit(where), Tuple2._2().skip(where)); } }
Streams { public final static <T> Tuple2<Stream<T>, Stream<T>> splitAt(final Stream<T> stream, final int where) { final Tuple2<Stream<T>, Stream<T>> Tuple2 = duplicate(stream); return Tuple.tuple( Tuple2._1().limit(where), Tuple2._2().skip(where)); }  }
Streams { public final static <T> Tuple2<Stream<T>, Stream<T>> splitAt(final Stream<T> stream, final int where) { final Tuple2<Stream<T>, Stream<T>> Tuple2 = duplicate(stream); return Tuple.tuple( Tuple2._1().limit(where), Tuple2._2().skip(where)); }  static ReactiveSeq<ReactiveSeq<T>> combinations(int size,Object[] a); static ReactiveSeq<ReactiveSeq<T>> permutations(Object[] a); static Stream<R> forEach4(Stream<? extends T1> value1,
                                                                 Function<? super T1, ? extends Stream<R1>> value2,
                                                                 BiFunction<? super T1, ? super R1, ? extends Stream<R2>> value3,
                                                                 Function3<? super T1, ? super R1, ? super R2, ? extends Stream<R3>> value4,
                                                                 Function4<? super T1, ? super R1, ? super R2, ? super R3, ? extends R> yieldingFunction); static Stream<R> forEach4(Stream<? extends T1> value1,
                                                                 Function<? super T1, ? extends Stream<R1>> value2,
                                                                 BiFunction<? super T1, ? super R1, ? extends Stream<R2>> value3,
                                                                 Function3<? super T1, ? super R1, ? super R2, ? extends Stream<R3>> value4,
                                                                 Function4<? super T1, ? super R1, ? super R2, ? super R3, Boolean> filterFunction,
                                                                 Function4<? super T1, ? super R1, ? super R2, ? super R3, ? extends R> yieldingFunction); static Stream<R> forEach3(Stream<? extends T1> value1,
                                                         Function<? super T1, ? extends Stream<R1>> value2,
                                                         BiFunction<? super T1, ? super R1, ? extends Stream<R2>> value3,
                                                         Function3<? super T1, ? super R1, ? super R2, ? extends R> yieldingFunction); static Stream<R> forEach3(Stream<? extends T1> value1,
                                                         Function<? super T1, ? extends Stream<R1>> value2,
                                                         BiFunction<? super T1, ? super R1, ? extends Stream<R2>> value3,
                                                         Function3<? super T1, ? super R1, ? super R2, Boolean> filterFunction,
                                                         Function3<? super T1, ? super R1, ? super R2, ? extends R> yieldingFunction); static Stream<R> forEach2(Stream<? extends T> value1,
                                               Function<? super T, Stream<R1>> value2,
                                               BiFunction<? super T, ? super R1, ? extends R> yieldingFunction); static Stream<R> forEach2(Stream<? extends T> value1,
                                               Function<? super T, ? extends Stream<R1>> value2,
                                               BiFunction<? super T, ? super R1, Boolean> filterFunction,
                                               BiFunction<? super T, ? super R1, ? extends R> yieldingFunction); final static Optional<Seq<T>> streamToOptional(final Stream<T> stream); final static Stream<T> optionalToStream(final Optional<T> optional); final static CompletableFuture<List<T>> streamToCompletableFuture(final Stream<T> stream); final static Stream<T> completableFutureToStream(final CompletableFuture<T> future); static Subscription forEach(final Stream<T> stream, final long x, final Consumer<? super T> consumerElement); static Subscription forEach(final Stream<T> stream, final long x,
                                                                final Consumer<? super T> consumerElement, final Consumer<? super Throwable> consumerError); static Subscription forEach(final Stream<T> stream, final long x,
                                                                final Consumer<? super T> consumerElement, final Consumer<? super Throwable> consumerError, final Runnable onComplete); static void forEach(final Stream<T> stream, final Consumer<? super T> consumerElement,
                                                        final Consumer<? super Throwable> consumerError); static void forEach(final Stream<T> stream, final Consumer<? super T> consumerElement,
                                                        final Consumer<? super Throwable> consumerError, final Runnable onComplete); static Connectable<T> schedule(final Stream<T> stream, final String cron, final ScheduledExecutorService ex); static Connectable<T> scheduleFixedDelay(final Stream<T> stream, final long delay, final ScheduledExecutorService ex); static Connectable<T> scheduleFixedRate(final Stream<T> stream, final long rate, final ScheduledExecutorService ex); final static Tuple2<Stream<T>, Stream<T>> splitAt(final Stream<T> stream, final int where); final static Tuple2<Stream<T>, Stream<T>> splitBy(final Stream<T> stream, final Predicate<T> splitter); final static Tuple2<Stream<T>, Stream<T>> partition(final Stream<T> stream, final Predicate<? super T> splitter); final static Tuple2<Stream<T>, Stream<T>> duplicate(final Stream<T> stream); final static Tuple2<Stream<T>, Stream<T>> duplicate(final Stream<T> stream,Supplier<Deque<T>> bufferFactory); @SuppressWarnings("unchecked") final static Tuple3<Stream<T>, Stream<T>, Stream<T>> triplicate(final Stream<T> stream); @SuppressWarnings("unchecked") final static Tuple3<Stream<T>, Stream<T>, Stream<T>> triplicate(final Stream<T> stream, Supplier<Deque<T>> bufferFactory); @SuppressWarnings("unchecked") final static Tuple4<Stream<T>, Stream<T>, Stream<T>, Stream<T>> quadruplicate(final Stream<T> stream); @SuppressWarnings("unchecked") final static Tuple4<Stream<T>, Stream<T>, Stream<T>, Stream<T>> quadruplicate(final Stream<T> stream, Supplier<Deque<T>> bufferFactory); static final Stream<T> appendStream(final Stream<T> stream1, final Stream<T> append); static final Stream<T> prependStream(final Stream<T> stream1, final Stream<T> prepend); static final Stream<T> append(final Stream<T> stream, final T... values); static final Stream<T> prepend(final Stream<T> stream, final T... values); static final Stream<T> insertAt(final Stream<T> stream, final int pos, final T... values); static final Stream<T> deleteBetween(final Stream<T> stream, final int start, final int end); static final Stream<T> insertStreamAt(final Stream<T> stream1, final int pos, final Stream<T> insert); static Stream<U> dropUntil(final Stream<U> stream, final Predicate<? super U> predicate); static Stream<U> dropRight(final Stream<U> stream, final int num); static Stream<U> takeRight(final Stream<U> stream, final int num); static Stream<T> recover(final Stream<T> stream, final Function<Throwable, ? extends T> fn); static Stream<T> recover(final Stream<T> stream, final Class<EX> type, final Function<EX, ? extends T> fn); static Stream<U> dropWhile(final Stream<U> stream, final Predicate<? super U> predicate); static Stream<U> take(final Stream<U> stream, final long time, final TimeUnit unit); static Stream<U> drop(final Stream<U> stream, final long time, final TimeUnit unit); static Stream<T> combine(final Stream<T> stream, final BiPredicate<? super T, ? super T> predicate, final BinaryOperator<T> op); static Iterable<Iterable<T>> combineI(final Iterable<T> stream, final BiPredicate<? super T, ? super T> predicate, final BinaryOperator<T> op); static Stream<U> takeWhile(final Stream<U> stream, final Predicate<? super U> predicate); static Stream<U> takeUntil(final Stream<U> stream, final Predicate<? super U> predicate); static Stream<U> reverse(final Stream<U> stream); static Stream<U> reversedStream(final List<U> list); static Stream<U> cycle(final Stream<U> s); static Stream<U> cycle(final Streamable<U> s); static Stream<U> cycle(final long times, final Streamable<U> s); static Stream<U> stream(final Iterable<U> it); static Stream<U> stream(final Spliterator<U> it); static Stream<U> stream(final Iterator<U> it); @Deprecated static Stream<U> concat(final Object o, final Stream<U> stream); final static Stream<Map.Entry<K, V>> stream(final Map<K, V> it); final static T firstValue(final Stream<T> stream); @SuppressWarnings({ "rawtypes", "unchecked" }) static Seq<R> reduce(final Stream<R> stream, final Iterable<? extends Monoid<R>> reducers); @SuppressWarnings({ "rawtypes", "unchecked" }) static Seq<R> reduce(final Stream<R> stream, final Stream<? extends Monoid<R>> reducers); final static Stream<T> cycleWhile(final Stream<T> stream, final Predicate<? super T> predicate); final static Stream<T> cycleUntil(final Stream<T> stream, final Predicate<? super T> predicate); final static Stream<R> zipSequence(final Stream<T> stream, final Stream<? extends S> second,
            final BiFunction<? super T, ? super S, ? extends R> zipper); final static Stream<R> zipStream(final Stream<T> stream,
            final BaseStream<? extends S, ? extends BaseStream<? extends S, ?>> second, final BiFunction<? super T, ? super S, ? extends R> zipper); final static Stream<Seq<T>> sliding(final Stream<T> stream, final int windowSize, final int increment); final static Stream<Streamable<T>> window(final Stream<T> stream, final int windowSize, final int increment); final static Stream<Seq<T>> sliding(final Stream<T> stream, final int windowSize); final static Stream<Vector<T>> grouped(final Stream<T> stream, final int groupSize); final static Stream<C> grouped(final Stream<T> stream, final int groupSize,
            final Supplier<C> factory); final static Streamable<T> shuffle(final Stream<T> stream); final static Streamable<T> toLazyStreamable(final Stream<T> stream); final static Stream<U> scanRight(final Stream<T> stream, final U identity,
            final BiFunction<? super T, ? super U, ? extends U> combiner); final static Stream<T> scanLeft(final Stream<T> stream, final Monoid<T> monoid); static boolean xMatch(final Stream<T> stream, final int num, final Predicate<? super T> c); final static boolean noneMatch(final Stream<T> stream, final Predicate<? super T> c); final static String join(final Stream<T> stream); final static String join(final Stream<T> stream, final String sep); final static String join(final Stream<T> stream, final String sep, final String start, final String end); final static Optional<T> minBy(final Stream<T> stream, final Function<? super T, ? extends C> f); final static Optional<T> min(final Stream<T> stream, final Comparator<? super T> comparator); final static Optional<T> maxBy(final Stream<T> stream, final Function<? super T, ? extends C> f); final static Optional<T> max(final Stream<T> stream, final Comparator<? super T> comparator); final static R foldMap(final Stream<T> stream, final Reducer<R,T> reducer); final static R foldMap(final Stream<T> stream, final Function<? super T, ? extends R> mapper, final Monoid<R> reducer); final static T foldLeft(final Stream<T> stream, final Monoid<T> reducer); final static R foldLeftMapToType(final Stream<T> stream, final Reducer<R,T> reducer); final static T foldRight(final Stream<T> stream, final Monoid<T> reducer); final static R foldRightMapToType(final Stream<T> stream, final Reducer<R,T> reducer); final static Streamable<T> toStreamable(final Stream<T> stream); final static Set<T> toSet(final Stream<T> stream); final static List<T> toList(final Stream<T> stream); final static boolean startsWith(final Stream<T> stream, final Iterable<T> iterable); final static boolean endsWith(final Stream<T> stream, final Iterable<T> iterable); final static boolean startsWith(final Stream<T> stream, final Stream<T> stream2); final static boolean startsWith(final Stream<T> stream, final Iterator<T> iterator); static ReactiveSeq<T> oneShotStream(final Iterable<T> iterable); static ReactiveSeq<T> oneShotStream(Stream<T> stream); static OneShotStreamX<T> oneShotStream(Spliterator<T> stream,final Optional<ReversableSpliterator> rev); final static ReactiveSeq<T> reactiveSeq(final Stream<? super T> stream, final Optional<ReversableSpliterator> rev); final static ReactiveSeq<T> reactiveSeq(final Iterable<T> iterable); final static ReactiveSeq<T> reactiveSeq(final Stream<T> stream); final static ReactiveSeq<T> reactiveSeq(final Spliterator<? super T> stream, final Optional<ReversableSpliterator> rev); static Stream<T> intersperse(final Stream<T> stream, final T value); @SuppressWarnings("unchecked") static Stream<U> ofType(final Stream<T> stream, final Class<? extends U> type); static Stream<U> cast(final Stream<T> stream, final Class<? extends U> type); final static Stream<T> narrow(Stream<? extends T> stream); final static Stream<R> concatMapterable(final Stream<T> stream, final Function<? super T, ? extends Iterable<? extends R>> fn); final static Stream<R> flatMapStream(final Stream<T> stream, final Function<? super T, ? extends BaseStream<? extends R, ?>> fn); final static Stream<R> flatMapOptional(final Stream<T> stream, final Function<? super T, Optional<? extends R>> fn); final static Stream<T> flatten(final Stream<Stream<T>> stream); final static Stream<R> flatMapCompletableFuture(final Stream<T> stream,
            final Function<? super T, CompletableFuture<? extends R>> fn); final static Stream<Character> flatMapCharSequence(final Stream<T> stream, final Function<? super T, CharSequence> fn); final static Stream<String> flatMapFile(final Stream<T> stream, final Function<? super T, File> fn); final static Stream<String> flatMapURL(final Stream<T> stream, final Function<? super T, URL> fn); final static Stream<String> flatMapBufferedReader(final Stream<T> stream, final Function<? super T, BufferedReader> fn); static final Tuple2<Iterable<A>, Iterable<A>> toBufferingDuplicator(final Iterable<A> it,Supplier<Deque<A>> bufferFactory); static final Tuple2<Iterable<A>, Iterable<A>> toBufferingDuplicator(final Iterable<A> it); static final Tuple2<Iterator<A>, Iterator<A>> toBufferingDuplicator(final Iterator<A> iterator); static final Tuple2<Iterator<A>, Iterator<A>> toBufferingDuplicator(final Iterator<A> iterator, final long pos); static final Tuple2<Iterator<A>, Iterator<A>> toBufferingDuplicator(final Iterator<A> iterator, Supplier<Deque<A>> bufferFactory); static final Tuple2<Iterator<A>, Iterator<A>> toBufferingDuplicator(final Iterator<A> iterator, final long pos,Supplier<Deque<A>> bufferFactory); static final Seq<Iterable<A>> toBufferingCopier(final Iterable<A> it, final int copies); static final Seq<Iterable<A>> toBufferingCopier(final Iterable<A> it, final int copies,Supplier<Deque<A>> bufferSupplier); static final Seq<Iterator<A>> toBufferingCopier(final Iterator<A> iterator, final int copies); static final Seq<Iterator<A>> toBufferingCopier(final Iterator<A> iterator, final int copies, Supplier<Deque<A>> bufferSupplier); static final Collection<A> toLazyCollection(final Stream<A> stream); static final Collection<A> toLazyCollection(final Iterator<A> iterator); static final Collection<A> toConcurrentLazyCollection(final Stream<A> stream); static final Collection<A> toConcurrentLazyCollection(final Iterator<A> iterator); final static Stream<Streamable<T>> windowByTime(final Stream<T> stream, final long time, final TimeUnit t); final static Stream<Seq<T>> groupedByTime(final Stream<T> stream, final long time, final TimeUnit t); @Deprecated final static Stream<Seq<T>> batchByTime(final Stream<T> stream, final long time, final TimeUnit t); final static Stream<C> groupedByTime(final Stream<T> stream, final long time, final TimeUnit t,
            final Supplier<C> factory); @Deprecated final static Stream<C> batchByTime(final Stream<T> stream, final long time, final TimeUnit t,
            final Supplier<C> factory); final static Stream<Seq<T>> groupedStatefullyUntil(final Stream<T> stream,
            final BiPredicate<Seq<? super T>, ? super T> predicate); final static Stream<Seq<T>> groupedWhile(final Stream<T> stream, final Predicate<? super T> predicate); @Deprecated final static Stream<Seq<T>> batchWhile(final Stream<T> stream, final Predicate<? super T> predicate); final static Stream<C> groupedWhile(final Stream<T> stream, final Predicate<? super T> predicate,
                                                                                                         final Supplier<C> factory); @Deprecated final static Stream<C> batchWhile(final Stream<T> stream, final Predicate<? super T> predicate,
            final Supplier<C> factory); final static Stream<Seq<T>> groupedUntil(final Stream<T> stream, final Predicate<? super T> predicate); @Deprecated final static Stream<Seq<T>> batchUntil(final Stream<T> stream, final Predicate<? super T> predicate); final static Stream<Seq<T>> groupedBySizeAndTime(final Stream<T> stream, final int size, final long time, final TimeUnit t); final static Stream<C> groupedBySizeAndTime(final Stream<T> stream, final int size, final long time,
            final TimeUnit t, final Supplier<C> factory); final static Stream<T> debounce(final Stream<T> stream, final long time, final TimeUnit t); final static Stream<T> onePer(final Stream<T> stream, final long time, final TimeUnit t); final static Stream<T> jitter(final Stream<T> stream, final long jitterInNanos); final static Stream<T> fixedDelay(final Stream<T> stream, final long time, final TimeUnit unit); final static Stream<T> xPer(final Stream<T> stream, final int x, final long time, final TimeUnit t); final static Connectable<T> hotStream(final Stream<T> stream, final Executor exec); final static Connectable<T> primedHotStream(final Stream<T> stream, final Executor exec); final static PausableConnectable<T> pausableHotStream(final Stream<T> stream, final Executor exec); final static PausableConnectable<T> primedPausableHotStream(final Stream<T> stream, final Executor exec); static Stream<R> tailRec(T initial, Function<? super T, ? extends Stream<? extends Either<T, R>>> fn); }
Streams { public final static <T> Tuple2<Stream<T>, Stream<T>> splitAt(final Stream<T> stream, final int where) { final Tuple2<Stream<T>, Stream<T>> Tuple2 = duplicate(stream); return Tuple.tuple( Tuple2._1().limit(where), Tuple2._2().skip(where)); }  static ReactiveSeq<ReactiveSeq<T>> combinations(int size,Object[] a); static ReactiveSeq<ReactiveSeq<T>> permutations(Object[] a); static Stream<R> forEach4(Stream<? extends T1> value1,
                                                                 Function<? super T1, ? extends Stream<R1>> value2,
                                                                 BiFunction<? super T1, ? super R1, ? extends Stream<R2>> value3,
                                                                 Function3<? super T1, ? super R1, ? super R2, ? extends Stream<R3>> value4,
                                                                 Function4<? super T1, ? super R1, ? super R2, ? super R3, ? extends R> yieldingFunction); static Stream<R> forEach4(Stream<? extends T1> value1,
                                                                 Function<? super T1, ? extends Stream<R1>> value2,
                                                                 BiFunction<? super T1, ? super R1, ? extends Stream<R2>> value3,
                                                                 Function3<? super T1, ? super R1, ? super R2, ? extends Stream<R3>> value4,
                                                                 Function4<? super T1, ? super R1, ? super R2, ? super R3, Boolean> filterFunction,
                                                                 Function4<? super T1, ? super R1, ? super R2, ? super R3, ? extends R> yieldingFunction); static Stream<R> forEach3(Stream<? extends T1> value1,
                                                         Function<? super T1, ? extends Stream<R1>> value2,
                                                         BiFunction<? super T1, ? super R1, ? extends Stream<R2>> value3,
                                                         Function3<? super T1, ? super R1, ? super R2, ? extends R> yieldingFunction); static Stream<R> forEach3(Stream<? extends T1> value1,
                                                         Function<? super T1, ? extends Stream<R1>> value2,
                                                         BiFunction<? super T1, ? super R1, ? extends Stream<R2>> value3,
                                                         Function3<? super T1, ? super R1, ? super R2, Boolean> filterFunction,
                                                         Function3<? super T1, ? super R1, ? super R2, ? extends R> yieldingFunction); static Stream<R> forEach2(Stream<? extends T> value1,
                                               Function<? super T, Stream<R1>> value2,
                                               BiFunction<? super T, ? super R1, ? extends R> yieldingFunction); static Stream<R> forEach2(Stream<? extends T> value1,
                                               Function<? super T, ? extends Stream<R1>> value2,
                                               BiFunction<? super T, ? super R1, Boolean> filterFunction,
                                               BiFunction<? super T, ? super R1, ? extends R> yieldingFunction); final static Optional<Seq<T>> streamToOptional(final Stream<T> stream); final static Stream<T> optionalToStream(final Optional<T> optional); final static CompletableFuture<List<T>> streamToCompletableFuture(final Stream<T> stream); final static Stream<T> completableFutureToStream(final CompletableFuture<T> future); static Subscription forEach(final Stream<T> stream, final long x, final Consumer<? super T> consumerElement); static Subscription forEach(final Stream<T> stream, final long x,
                                                                final Consumer<? super T> consumerElement, final Consumer<? super Throwable> consumerError); static Subscription forEach(final Stream<T> stream, final long x,
                                                                final Consumer<? super T> consumerElement, final Consumer<? super Throwable> consumerError, final Runnable onComplete); static void forEach(final Stream<T> stream, final Consumer<? super T> consumerElement,
                                                        final Consumer<? super Throwable> consumerError); static void forEach(final Stream<T> stream, final Consumer<? super T> consumerElement,
                                                        final Consumer<? super Throwable> consumerError, final Runnable onComplete); static Connectable<T> schedule(final Stream<T> stream, final String cron, final ScheduledExecutorService ex); static Connectable<T> scheduleFixedDelay(final Stream<T> stream, final long delay, final ScheduledExecutorService ex); static Connectable<T> scheduleFixedRate(final Stream<T> stream, final long rate, final ScheduledExecutorService ex); final static Tuple2<Stream<T>, Stream<T>> splitAt(final Stream<T> stream, final int where); final static Tuple2<Stream<T>, Stream<T>> splitBy(final Stream<T> stream, final Predicate<T> splitter); final static Tuple2<Stream<T>, Stream<T>> partition(final Stream<T> stream, final Predicate<? super T> splitter); final static Tuple2<Stream<T>, Stream<T>> duplicate(final Stream<T> stream); final static Tuple2<Stream<T>, Stream<T>> duplicate(final Stream<T> stream,Supplier<Deque<T>> bufferFactory); @SuppressWarnings("unchecked") final static Tuple3<Stream<T>, Stream<T>, Stream<T>> triplicate(final Stream<T> stream); @SuppressWarnings("unchecked") final static Tuple3<Stream<T>, Stream<T>, Stream<T>> triplicate(final Stream<T> stream, Supplier<Deque<T>> bufferFactory); @SuppressWarnings("unchecked") final static Tuple4<Stream<T>, Stream<T>, Stream<T>, Stream<T>> quadruplicate(final Stream<T> stream); @SuppressWarnings("unchecked") final static Tuple4<Stream<T>, Stream<T>, Stream<T>, Stream<T>> quadruplicate(final Stream<T> stream, Supplier<Deque<T>> bufferFactory); static final Stream<T> appendStream(final Stream<T> stream1, final Stream<T> append); static final Stream<T> prependStream(final Stream<T> stream1, final Stream<T> prepend); static final Stream<T> append(final Stream<T> stream, final T... values); static final Stream<T> prepend(final Stream<T> stream, final T... values); static final Stream<T> insertAt(final Stream<T> stream, final int pos, final T... values); static final Stream<T> deleteBetween(final Stream<T> stream, final int start, final int end); static final Stream<T> insertStreamAt(final Stream<T> stream1, final int pos, final Stream<T> insert); static Stream<U> dropUntil(final Stream<U> stream, final Predicate<? super U> predicate); static Stream<U> dropRight(final Stream<U> stream, final int num); static Stream<U> takeRight(final Stream<U> stream, final int num); static Stream<T> recover(final Stream<T> stream, final Function<Throwable, ? extends T> fn); static Stream<T> recover(final Stream<T> stream, final Class<EX> type, final Function<EX, ? extends T> fn); static Stream<U> dropWhile(final Stream<U> stream, final Predicate<? super U> predicate); static Stream<U> take(final Stream<U> stream, final long time, final TimeUnit unit); static Stream<U> drop(final Stream<U> stream, final long time, final TimeUnit unit); static Stream<T> combine(final Stream<T> stream, final BiPredicate<? super T, ? super T> predicate, final BinaryOperator<T> op); static Iterable<Iterable<T>> combineI(final Iterable<T> stream, final BiPredicate<? super T, ? super T> predicate, final BinaryOperator<T> op); static Stream<U> takeWhile(final Stream<U> stream, final Predicate<? super U> predicate); static Stream<U> takeUntil(final Stream<U> stream, final Predicate<? super U> predicate); static Stream<U> reverse(final Stream<U> stream); static Stream<U> reversedStream(final List<U> list); static Stream<U> cycle(final Stream<U> s); static Stream<U> cycle(final Streamable<U> s); static Stream<U> cycle(final long times, final Streamable<U> s); static Stream<U> stream(final Iterable<U> it); static Stream<U> stream(final Spliterator<U> it); static Stream<U> stream(final Iterator<U> it); @Deprecated static Stream<U> concat(final Object o, final Stream<U> stream); final static Stream<Map.Entry<K, V>> stream(final Map<K, V> it); final static T firstValue(final Stream<T> stream); @SuppressWarnings({ "rawtypes", "unchecked" }) static Seq<R> reduce(final Stream<R> stream, final Iterable<? extends Monoid<R>> reducers); @SuppressWarnings({ "rawtypes", "unchecked" }) static Seq<R> reduce(final Stream<R> stream, final Stream<? extends Monoid<R>> reducers); final static Stream<T> cycleWhile(final Stream<T> stream, final Predicate<? super T> predicate); final static Stream<T> cycleUntil(final Stream<T> stream, final Predicate<? super T> predicate); final static Stream<R> zipSequence(final Stream<T> stream, final Stream<? extends S> second,
            final BiFunction<? super T, ? super S, ? extends R> zipper); final static Stream<R> zipStream(final Stream<T> stream,
            final BaseStream<? extends S, ? extends BaseStream<? extends S, ?>> second, final BiFunction<? super T, ? super S, ? extends R> zipper); final static Stream<Seq<T>> sliding(final Stream<T> stream, final int windowSize, final int increment); final static Stream<Streamable<T>> window(final Stream<T> stream, final int windowSize, final int increment); final static Stream<Seq<T>> sliding(final Stream<T> stream, final int windowSize); final static Stream<Vector<T>> grouped(final Stream<T> stream, final int groupSize); final static Stream<C> grouped(final Stream<T> stream, final int groupSize,
            final Supplier<C> factory); final static Streamable<T> shuffle(final Stream<T> stream); final static Streamable<T> toLazyStreamable(final Stream<T> stream); final static Stream<U> scanRight(final Stream<T> stream, final U identity,
            final BiFunction<? super T, ? super U, ? extends U> combiner); final static Stream<T> scanLeft(final Stream<T> stream, final Monoid<T> monoid); static boolean xMatch(final Stream<T> stream, final int num, final Predicate<? super T> c); final static boolean noneMatch(final Stream<T> stream, final Predicate<? super T> c); final static String join(final Stream<T> stream); final static String join(final Stream<T> stream, final String sep); final static String join(final Stream<T> stream, final String sep, final String start, final String end); final static Optional<T> minBy(final Stream<T> stream, final Function<? super T, ? extends C> f); final static Optional<T> min(final Stream<T> stream, final Comparator<? super T> comparator); final static Optional<T> maxBy(final Stream<T> stream, final Function<? super T, ? extends C> f); final static Optional<T> max(final Stream<T> stream, final Comparator<? super T> comparator); final static R foldMap(final Stream<T> stream, final Reducer<R,T> reducer); final static R foldMap(final Stream<T> stream, final Function<? super T, ? extends R> mapper, final Monoid<R> reducer); final static T foldLeft(final Stream<T> stream, final Monoid<T> reducer); final static R foldLeftMapToType(final Stream<T> stream, final Reducer<R,T> reducer); final static T foldRight(final Stream<T> stream, final Monoid<T> reducer); final static R foldRightMapToType(final Stream<T> stream, final Reducer<R,T> reducer); final static Streamable<T> toStreamable(final Stream<T> stream); final static Set<T> toSet(final Stream<T> stream); final static List<T> toList(final Stream<T> stream); final static boolean startsWith(final Stream<T> stream, final Iterable<T> iterable); final static boolean endsWith(final Stream<T> stream, final Iterable<T> iterable); final static boolean startsWith(final Stream<T> stream, final Stream<T> stream2); final static boolean startsWith(final Stream<T> stream, final Iterator<T> iterator); static ReactiveSeq<T> oneShotStream(final Iterable<T> iterable); static ReactiveSeq<T> oneShotStream(Stream<T> stream); static OneShotStreamX<T> oneShotStream(Spliterator<T> stream,final Optional<ReversableSpliterator> rev); final static ReactiveSeq<T> reactiveSeq(final Stream<? super T> stream, final Optional<ReversableSpliterator> rev); final static ReactiveSeq<T> reactiveSeq(final Iterable<T> iterable); final static ReactiveSeq<T> reactiveSeq(final Stream<T> stream); final static ReactiveSeq<T> reactiveSeq(final Spliterator<? super T> stream, final Optional<ReversableSpliterator> rev); static Stream<T> intersperse(final Stream<T> stream, final T value); @SuppressWarnings("unchecked") static Stream<U> ofType(final Stream<T> stream, final Class<? extends U> type); static Stream<U> cast(final Stream<T> stream, final Class<? extends U> type); final static Stream<T> narrow(Stream<? extends T> stream); final static Stream<R> concatMapterable(final Stream<T> stream, final Function<? super T, ? extends Iterable<? extends R>> fn); final static Stream<R> flatMapStream(final Stream<T> stream, final Function<? super T, ? extends BaseStream<? extends R, ?>> fn); final static Stream<R> flatMapOptional(final Stream<T> stream, final Function<? super T, Optional<? extends R>> fn); final static Stream<T> flatten(final Stream<Stream<T>> stream); final static Stream<R> flatMapCompletableFuture(final Stream<T> stream,
            final Function<? super T, CompletableFuture<? extends R>> fn); final static Stream<Character> flatMapCharSequence(final Stream<T> stream, final Function<? super T, CharSequence> fn); final static Stream<String> flatMapFile(final Stream<T> stream, final Function<? super T, File> fn); final static Stream<String> flatMapURL(final Stream<T> stream, final Function<? super T, URL> fn); final static Stream<String> flatMapBufferedReader(final Stream<T> stream, final Function<? super T, BufferedReader> fn); static final Tuple2<Iterable<A>, Iterable<A>> toBufferingDuplicator(final Iterable<A> it,Supplier<Deque<A>> bufferFactory); static final Tuple2<Iterable<A>, Iterable<A>> toBufferingDuplicator(final Iterable<A> it); static final Tuple2<Iterator<A>, Iterator<A>> toBufferingDuplicator(final Iterator<A> iterator); static final Tuple2<Iterator<A>, Iterator<A>> toBufferingDuplicator(final Iterator<A> iterator, final long pos); static final Tuple2<Iterator<A>, Iterator<A>> toBufferingDuplicator(final Iterator<A> iterator, Supplier<Deque<A>> bufferFactory); static final Tuple2<Iterator<A>, Iterator<A>> toBufferingDuplicator(final Iterator<A> iterator, final long pos,Supplier<Deque<A>> bufferFactory); static final Seq<Iterable<A>> toBufferingCopier(final Iterable<A> it, final int copies); static final Seq<Iterable<A>> toBufferingCopier(final Iterable<A> it, final int copies,Supplier<Deque<A>> bufferSupplier); static final Seq<Iterator<A>> toBufferingCopier(final Iterator<A> iterator, final int copies); static final Seq<Iterator<A>> toBufferingCopier(final Iterator<A> iterator, final int copies, Supplier<Deque<A>> bufferSupplier); static final Collection<A> toLazyCollection(final Stream<A> stream); static final Collection<A> toLazyCollection(final Iterator<A> iterator); static final Collection<A> toConcurrentLazyCollection(final Stream<A> stream); static final Collection<A> toConcurrentLazyCollection(final Iterator<A> iterator); final static Stream<Streamable<T>> windowByTime(final Stream<T> stream, final long time, final TimeUnit t); final static Stream<Seq<T>> groupedByTime(final Stream<T> stream, final long time, final TimeUnit t); @Deprecated final static Stream<Seq<T>> batchByTime(final Stream<T> stream, final long time, final TimeUnit t); final static Stream<C> groupedByTime(final Stream<T> stream, final long time, final TimeUnit t,
            final Supplier<C> factory); @Deprecated final static Stream<C> batchByTime(final Stream<T> stream, final long time, final TimeUnit t,
            final Supplier<C> factory); final static Stream<Seq<T>> groupedStatefullyUntil(final Stream<T> stream,
            final BiPredicate<Seq<? super T>, ? super T> predicate); final static Stream<Seq<T>> groupedWhile(final Stream<T> stream, final Predicate<? super T> predicate); @Deprecated final static Stream<Seq<T>> batchWhile(final Stream<T> stream, final Predicate<? super T> predicate); final static Stream<C> groupedWhile(final Stream<T> stream, final Predicate<? super T> predicate,
                                                                                                         final Supplier<C> factory); @Deprecated final static Stream<C> batchWhile(final Stream<T> stream, final Predicate<? super T> predicate,
            final Supplier<C> factory); final static Stream<Seq<T>> groupedUntil(final Stream<T> stream, final Predicate<? super T> predicate); @Deprecated final static Stream<Seq<T>> batchUntil(final Stream<T> stream, final Predicate<? super T> predicate); final static Stream<Seq<T>> groupedBySizeAndTime(final Stream<T> stream, final int size, final long time, final TimeUnit t); final static Stream<C> groupedBySizeAndTime(final Stream<T> stream, final int size, final long time,
            final TimeUnit t, final Supplier<C> factory); final static Stream<T> debounce(final Stream<T> stream, final long time, final TimeUnit t); final static Stream<T> onePer(final Stream<T> stream, final long time, final TimeUnit t); final static Stream<T> jitter(final Stream<T> stream, final long jitterInNanos); final static Stream<T> fixedDelay(final Stream<T> stream, final long time, final TimeUnit unit); final static Stream<T> xPer(final Stream<T> stream, final int x, final long time, final TimeUnit t); final static Connectable<T> hotStream(final Stream<T> stream, final Executor exec); final static Connectable<T> primedHotStream(final Stream<T> stream, final Executor exec); final static PausableConnectable<T> pausableHotStream(final Stream<T> stream, final Executor exec); final static PausableConnectable<T> primedPausableHotStream(final Stream<T> stream, final Executor exec); static Stream<R> tailRec(T initial, Function<? super T, ? extends Stream<? extends Either<T, R>>> fn);  }