Reactive programming with Java 8 and simple-react : sequence operations

John McClean
2 min readMar 25, 2015

--

EagerFutureStream and LazyFutureStream also have a range of advanced Sequencing operations.

  • concat(Stream)
  • concat(T)
  • concat(T…)
  • cycle()
  • zip(Seq)
  • zip(Seq, BiFunction)
  • zipWithIndex()
  • foldLeft(U, BiFunction)
  • foldRight(U, BiFunction<? super T, U, U>)
  • scanLeft(U, BiFunction)
  • scanRight(U, BiFunction<? super T, U, U>)
  • reverse()
  • shuffle()
  • shuffle(Random)
  • skipWhile(Predicate<? super T>)
  • skipUntil(Predicate<? super T>)
  • limitWhile(Predicate<? super T>)
  • limitUntil(Predicate<? super T>)
  • intersperse(T)
  • duplicate()
  • partition(Predicate<? super T>)
  • splitAt(long)
  • splitAtHead()
  • slice(long, long)
  • toCollection(Supplier)
  • toList()
  • toSet()
  • toMap(Function, Function)
  • toString(String)
  • minBy(Function)
  • minBy(Function, Comparator<? super U>)
  • maxBy(Function)
  • maxBy(Function, Comparator<? super U>)
  • ofType(Class)
  • cast(Class)
  • groupBy(Function<? super T, ? extends K>)
  • groupBy(Function<? super T, ? extends K>, Collector<? super T, A, D>)
  • groupBy(Function<? super T, ? extends K>, Supplier, Collector<? super T, A, D>)
  • join()
  • join(CharSequence)
  • join(CharSequence, CharSequence, CharSequence)
  • cycle(Stream)
  • unzip(Stream>)
  • unzip(Stream>, Function, Function)
  • unzip(Stream>, Function, Tuple2>)
  • unzip(Stream>, BiFunction>)
  • zip(Stream, Stream)
  • zip(Stream, Stream, BiFunction)
  • zipWithIndex(Stream)
  • foldLeft(Stream, U, BiFunction)
  • foldRight(Stream, U, BiFunction<? super T, U, U>)
  • scanLeft(Stream, U, BiFunction)
  • scanRight(Stream, U, BiFunction<? super T, U, U>)
  • unfold(U, Function>>)
  • reverse(Stream)
  • shuffle(Stream)
  • shuffle(Stream, Random)
  • concat(Stream…)
  • duplicate(Stream)
  • toString(Stream<?>)
  • toString(Stream<?>, String)
  • toCollection(Stream, Supplier)
  • toList(Stream)
  • toSet(Stream)
  • toMap(Stream>)
  • toMap(Stream, Function, Function)
  • slice(Stream, long, long)
  • skip(Stream, long)
  • skipWhile(Stream, Predicate<? super T>)
  • skipUntil(Stream, Predicate<? super T>)
  • limit(Stream, long)
  • limitWhile(Stream, Predicate<? super T>)
  • limitUntil(Stream, Predicate<? super T>)
  • intersperse(Stream, T)
  • partition(Stream, Predicate<? super T>)
  • splitAt(Stream, long)
  • splitAtHead(Stream)
  • ofType(Stream, Class)
  • cast(Stream, Class)
  • groupBy(Stream, Function<? super T, ? extends K>)
  • groupBy(Stream, Function<? super T, ? extends K>, Collector<? super T, A, D>)
  • groupBy(Stream, Function<? super T, ? extends K>, Supplier, Collector<? super T, A, D>)
  • join(Stream<?>)
  • join(Stream<?>, CharSequence)
  • join(Stream<?>, CharSequence, CharSequence, CharSequence)
  • filter(Predicate<? super T>)
  • map(Function<? super T, ? extends R>)
  • mapToInt(ToIntFunction<? super T>)
  • mapToLong(ToLongFunction<? super T>)
  • mapToDouble(ToDoubleFunction<? super T>)
  • flatMap(Function<? super T, ? extends Stream<? extends R>>)
  • flatMapToInt(Function<? super T, ? extends IntStream>)
  • flatMapToLong(Function<? super T, ? extends LongStream>)
  • flatMapToDouble(Function<? super T, ? extends DoubleStream>)
  • distinct()
  • sorted()
  • sorted(Comparator<? super T>)
  • peek(Consumer<? super T>)
  • limit(long)
  • skip(long)
  • forEach(Consumer<? super T>)

The Tutorial : Reactive programming with Java 8

--

--

John McClean

Architecture @ Verizon Media. Maintainer of Cyclops. Twitter @johnmcclean_ie