code: @NotNull
      public static <T> Stream<T> merge(
              @NotNull Stream<? extends T> stream1,
              @NotNull Stream<? extends T> stream2,
              @NotNull BiFunction<? super T, ? super T, ObjMerge.MergeResult> selector) {
          Objects.requireNonNull(stream1);
          Objects.requireNonNull(stream2);
          return Stream.<T>merge(stream1.iterator, stream2.iterator, selector);
      }
docs: Merges elements of two streams according to the supplied selector function.
  
  <p>Example 1 — Merge two sorted streams:
  <pre>
  stream1: [1, 3, 8, 10]
  stream2: [2, 5, 6, 12]
  selector: (a, b) -&gt; a &lt; b ? TAKE_FIRST : TAKE_SECOND
  result: [1, 2, 3, 5, 6, 8, 10, 12]
  </pre>
  
  <p>Example 2 — Concat two streams:
  <pre>
  stream1: [0, 3, 1]
  stream2: [2, 5, 6, 1]
  selector: (a, b) -&gt; TAKE_SECOND
  result: [2, 5, 6, 1, 0, 3, 1]
  </pre>
  
  @param <T> the type of the elements
  @param stream1  the first stream
  @param stream2  the second stream
  @param selector the selector function used to choose elements
  @return the new stream
  @throws NullPointerException if {@code stream1} or {@code stream2} is null
  @since 1.1.9