test_class.file: rxjava/src/test/java/io/reactivex/internal/operators/observable/ObservableScalarXMapTest.java
test_class.identifier: ObservableScalarXMapTest
test_case.body: @Test
      public void mapperToJust() {
          TestObserver<Integer> to = new TestObserver<Integer>();
  
          assertTrue(ObservableScalarXMap.tryScalarXMapSubscribe(new OneCallablePublisher(), to, new Function<Integer, ObservableSource<Integer>>() {
              @Override
              public ObservableSource<Integer> apply(Integer f) throws Exception {
                  return Observable.just(1);
              }
          }));
  
          to.assertResult(1);
      }
test_case.class_method_signature: ObservableScalarXMapTest.mapperToJust()
test_case.full_signature: @Test public void mapperToJust()
test_case.identifier: mapperToJust
test_case.invocations: assertTrue tryScalarXMapSubscribe just assertResult
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void mapperToJust()
focal_class.file: rxjava/src/main/java/io/reactivex/internal/operators/observable/ObservableScalarXMap.java
focal_class.identifier: ObservableScalarXMap
focal_class.class_method_signature: ObservableScalarXMap.ObservableScalarXMap()
focal_class.full_signature: private  ObservableScalarXMap()
focal_class.identifier: ObservableScalarXMap
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  ObservableScalarXMap()
focal_class.class_method_signature: ObservableScalarXMap.tryScalarXMapSubscribe(ObservableSource<T> source,
              Observer<? super R> observer,
              Function<? super T, ? extends ObservableSource<? extends R>> mapper)
focal_class.full_signature: @SuppressWarnings("unchecked") public static boolean tryScalarXMapSubscribe(ObservableSource<T> source,
              Observer<? super R> observer,
              Function<? super T, ? extends ObservableSource<? extends R>> mapper)
focal_class.identifier: tryScalarXMapSubscribe
focal_class.modifiers: @SuppressWarnings("unchecked") public static
focal_class.parameters: (ObservableSource<T> source,
              Observer<? super R> observer,
              Function<? super T, ? extends ObservableSource<? extends R>> mapper)
focal_class.return: boolean
focal_class.signature: boolean tryScalarXMapSubscribe(ObservableSource<T> source,
              Observer<? super R> observer,
              Function<? super T, ? extends ObservableSource<? extends R>> mapper)
focal_class.class_method_signature: ObservableScalarXMap.scalarXMap(T value,
              Function<? super T, ? extends ObservableSource<? extends U>> mapper)
focal_class.full_signature: public static Observable<U> scalarXMap(T value,
              Function<? super T, ? extends ObservableSource<? extends U>> mapper)
focal_class.identifier: scalarXMap
focal_class.modifiers: public static
focal_class.parameters: (T value,
              Function<? super T, ? extends ObservableSource<? extends U>> mapper)
focal_class.return: Observable<U>
focal_class.signature: Observable<U> scalarXMap(T value,
              Function<? super T, ? extends ObservableSource<? extends U>> mapper)
focal_method.body: @SuppressWarnings("unchecked")
      public static <T, R> boolean tryScalarXMapSubscribe(ObservableSource<T> source,
              Observer<? super R> observer,
              Function<? super T, ? extends ObservableSource<? extends R>> mapper) {
          if (source instanceof Callable) {
              T t;
  
              try {
                  t = ((Callable<T>)source).call();
              } catch (Throwable ex) {
                  Exceptions.throwIfFatal(ex);
                  EmptyDisposable.error(ex, observer);
                  return true;
              }
  
              if (t == null) {
                  EmptyDisposable.complete(observer);
                  return true;
              }
  
              ObservableSource<? extends R> r;
  
              try {
                  r = ObjectHelper.requireNonNull(mapper.apply(t), "The mapper returned a null ObservableSource");
              } catch (Throwable ex) {
                  Exceptions.throwIfFatal(ex);
                  EmptyDisposable.error(ex, observer);
                  return true;
              }
  
              if (r instanceof Callable) {
                  R u;
  
                  try {
                      u = ((Callable<R>)r).call();
                  } catch (Throwable ex) {
                      Exceptions.throwIfFatal(ex);
                      EmptyDisposable.error(ex, observer);
                      return true;
                  }
  
                  if (u == null) {
                      EmptyDisposable.complete(observer);
                      return true;
                  }
                  ScalarDisposable<R> sd = new ScalarDisposable<R>(observer, u);
                  observer.onSubscribe(sd);
                  sd.run();
              } else {
                  r.subscribe(observer);
              }
  
              return true;
          }
          return false;
      }
focal_method.class_method_signature: ObservableScalarXMap.tryScalarXMapSubscribe(ObservableSource<T> source,
              Observer<? super R> observer,
              Function<? super T, ? extends ObservableSource<? extends R>> mapper)
focal_method.full_signature: @SuppressWarnings("unchecked") public static boolean tryScalarXMapSubscribe(ObservableSource<T> source,
              Observer<? super R> observer,
              Function<? super T, ? extends ObservableSource<? extends R>> mapper)
focal_method.identifier: tryScalarXMapSubscribe
focal_method.invocations: call throwIfFatal error complete requireNonNull apply throwIfFatal error call throwIfFatal error complete onSubscribe run subscribe
focal_method.modifiers: @SuppressWarnings("unchecked") public static
focal_method.parameters: (ObservableSource<T> source,
              Observer<? super R> observer,
              Function<? super T, ? extends ObservableSource<? extends R>> mapper)
focal_method.return: boolean
focal_method.signature: boolean tryScalarXMapSubscribe(ObservableSource<T> source,
              Observer<? super R> observer,
              Function<? super T, ? extends ObservableSource<? extends R>> mapper)