title: What's the difference between rxjava2's Maybe and Optional?
body: <p>The doc says </p>
  
  <blockquote>
    <p>Conceptually, it is a union of Single and Completable providing the
    means to capture an emission pattern where there could be 0 or 1 item
    or an error signalled by some reactive source.</p>
  </blockquote>
  
  <p>But I am not sure what it truly means. It seems it is java8's <code>Optional</code>.</p>
  
  <p>The following two codes have the same result , but I don't know what <code>Maybe</code> can do and <code>Optional</code> cannot (or cumbersome) do.</p>
  
  <pre><code>  @Test
    public void testMaybe1() {
      Observable.just(3, 2, 1, 0, -1)
        .map(i -&gt; {
          try {
            int result = 6 / i;
            return Maybe.just(result);
          } catch (Exception e) {
            return Maybe.empty();
          }
        })
        .blockingForEach(maybe -&gt; {
            logger.info("result = {}", maybe.blockingGet());
          }
        );
    }
  
  
    @Test
    public void testMaybe2() {
      Observable.just(3, 2, 1, 0, -1)
        .map(i -&gt; {
          try {
            int result = 6 / i;
            return Optional.of(result);
          } catch (Exception e) {
            return Optional.empty();
          }
        })
        .blockingForEach(opt -&gt; {
            logger.info("result = {}", opt.orElse(null));
          }
        );
    }
  </code></pre>
  
  <p>The results are the same :</p>
  
  <pre><code>result = 2
  result = 3
  result = 6
  result = null
  result = -6
  </code></pre>
  
  <p>In rxJava1 , My API used to return <code>Observable&lt;Optional&lt;T&gt;&gt;</code> , Is it a bad smell ? Should I change to <code>Observable&lt;Maybe&lt;T&gt;&gt;</code> ?</p>