mobius-rx2/src/main/java/com/spotify/mobius/rx2/RxMobius.java [39:99]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public final class RxMobius {
  private RxMobius() {
    // prevent instantiation
  }

  /**
   * Create an observable transformer that starts from a given model.
   *
   * <p>Every time the resulting observable is subscribed to, a new MobiusLoop will be started from
   * the given model.
   *
   * @param loopFactory gets invoked for each subscription, to create a new MobiusLoop instance
   * @param startModel the starting point for each new loop
   * @param <M> the model type
   * @param <E> the event type
   * @param <F> the effect type
   * @return a transformer from event to model that you can connect to your UI
   */
  public static <M, E, F> ObservableTransformer<E, M> loopFrom(
      final MobiusLoop.Factory<M, E, F> loopFactory, final M startModel) {
    return new RxMobiusLoop<>(loopFactory, startModel, null);
  }

  /**
   * Create an observable transformer that starts from a given model and given effects.
   *
   * <p>Every time the resulting observable is subscribed to, a new MobiusLoop will be started from
   * the given model and the given effects.
   *
   * @param loopFactory gets invoked for each subscription, to create a new MobiusLoop instance
   * @param startModel the starting point for each new loop
   * @param startEffects the starting effects for each new loop
   * @param <M> the model type
   * @param <E> the event type
   * @param <F> the effect type
   * @return a transformer from event to model that you can connect to your UI
   */
  public static <M, E, F> ObservableTransformer<E, M> loopFrom(
      final MobiusLoop.Factory<M, E, F> loopFactory,
      final M startModel,
      final Set<F> startEffects) {
    return new RxMobiusLoop<>(loopFactory, startModel, startEffects);
  }

  /**
   * Create a {@link MobiusLoop.Builder} to help you configure a MobiusLoop before starting it.
   *
   * <p>Once done configuring the loop you can start the loop using {@link
   * MobiusLoop.Factory#startFrom(Object)}.
   *
   * @param update the {@link Update} function of the loop
   * @param effectHandler the {@link ObservableTransformer} effect handler of the loop
   * @param <M> the model type
   * @param <E> the event type
   * @param <F> the effect type
   * @return a {@link MobiusLoop.Builder} instance that you can further configure before starting
   *     the loop
   */
  public static <M, E, F> MobiusLoop.Builder<M, E, F> loop(
      Update<M, E, F> update, ObservableTransformer<F, E> effectHandler) {
    return Mobius.loop(update, RxConnectables.fromTransformer(effectHandler));
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



mobius-rx3/src/main/java/com/spotify/mobius/rx3/RxMobius.java [39:100]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public final class RxMobius {

  private RxMobius() {
    // prevent instantiation
  }

  /**
   * Create an observable transformer that starts from a given model.
   *
   * <p>Every time the resulting observable is subscribed to, a new MobiusLoop will be started from
   * the given model.
   *
   * @param loopFactory gets invoked for each subscription, to create a new MobiusLoop instance
   * @param startModel the starting point for each new loop
   * @param <M> the model type
   * @param <E> the event type
   * @param <F> the effect type
   * @return a transformer from event to model that you can connect to your UI
   */
  public static <M, E, F> ObservableTransformer<E, M> loopFrom(
      final MobiusLoop.Factory<M, E, F> loopFactory, final M startModel) {
    return new RxMobiusLoop<>(loopFactory, startModel, null);
  }

  /**
   * Create an observable transformer that starts from a given model and given effects.
   *
   * <p>Every time the resulting observable is subscribed to, a new MobiusLoop will be started from
   * the given model and the given effects.
   *
   * @param loopFactory gets invoked for each subscription, to create a new MobiusLoop instance
   * @param startModel the starting point for each new loop
   * @param startEffects the starting effects for each new loop
   * @param <M> the model type
   * @param <E> the event type
   * @param <F> the effect type
   * @return a transformer from event to model that you can connect to your UI
   */
  public static <M, E, F> ObservableTransformer<E, M> loopFrom(
      final MobiusLoop.Factory<M, E, F> loopFactory,
      final M startModel,
      final Set<F> startEffects) {
    return new RxMobiusLoop<>(loopFactory, startModel, startEffects);
  }

  /**
   * Create a {@link MobiusLoop.Builder} to help you configure a MobiusLoop before starting it.
   *
   * <p>Once done configuring the loop you can start the loop using {@link
   * MobiusLoop.Factory#startFrom(Object)}.
   *
   * @param update the {@link Update} function of the loop
   * @param effectHandler the {@link ObservableTransformer} effect handler of the loop
   * @param <M> the model type
   * @param <E> the event type
   * @param <F> the effect type
   * @return a {@link MobiusLoop.Builder} instance that you can further configure before starting
   *     the loop
   */
  public static <M, E, F> MobiusLoop.Builder<M, E, F> loop(
      Update<M, E, F> update, ObservableTransformer<F, E> effectHandler) {
    return Mobius.loop(update, RxConnectables.fromTransformer(effectHandler));
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



