@@ -572,6 +572,20 @@ default <R> Streamable<R> flatMap(@NonNull Function<? super T, ? extends Streama
572572 return RxJavaPlugins .onAssembly (new StreamableFlatMap <>(this , mapper , config .maxConcurrency ()));
573573 }
574574
575+ /**
576+ * Maps each upstream item into a {@code GroupedStreamable} group, emits those groups and keeps
577+ * relaying the upstream items into those groups.
578+ * @param <K> the key type, {@code null}s allowed
579+ * @param keySelector the function that receives the upstream item and returns a key that determines
580+ * which group the item will go into
581+ * @return the new {@code Streamable} instance
582+ * @throws NullPointerException if {@code keySelector} is {@code null}
583+ */
584+ default <@ Nullable K > Streamable <GroupedStreamable <K , T >> groupBy (Function <? super T , ? extends K > keySelector ) {
585+ Objects .requireNonNull (keySelector , "keySelector is null" );
586+ return RxJavaPlugins .onAssembly (new StreamableGroupBy <>(this , keySelector ));
587+ }
588+
575589 /**
576590 * Hides the identity of this {@code Streamable} and its {@link Streamer}.
577591 * <p>
@@ -688,6 +702,21 @@ default Streamable<T> takeWhile(@NonNull Predicate<? super T> predicate) {
688702 return RxJavaPlugins .onAssembly (new StreamableTakeWhile <>(this , predicate ));
689703 }
690704
705+ /**
706+ * Relays items from this {@code Streamable} until the other {@code Streamable} signals
707+ * an item or completes.
708+ * @param <U> the element type of the other {@code Streamable}
709+ * @param other the {@code Streamable} expected to signal when to stop taking items from this {@code Streamable}
710+ * @return the new {@code Streamable} instance
711+ * @throws NullPointerException if {@code other} is {@code null}
712+ */
713+ @ CheckReturnValue
714+ @ NonNull
715+ default <U > Streamable <T > takeUntil (@ NonNull Streamable <U > other ) {
716+ Objects .requireNonNull (other , "other is null" );
717+ return RxJavaPlugins .onAssembly (new StreamableTakeUntil <>(this , other ));
718+ }
719+
691720 /**
692721 * Calls the specified converter function during assembly time and returns its resulting value.
693722 * <p>
0 commit comments