code: public int compareNext() throws FetchException {
          if (mCompareResult != 0) {
              return mCompareResult;
          }
  
          try {
              while (true) {
                  if (mNextLeft == null && mLeftCursor.hasNext()) {
                      mNextLeft = mLeftCursor.next();
                  }
                  if (mNextRight == null && mRightCursor.hasNext()) {
                      mNextRight = mRightCursor.next();
                  }
  
                  if (mNextLeft == null) {
                      return mNextRight != null ? 1 : 0;
                  }
                  if (mNextRight == null) {
                      return -1;
                  }
  
                  if ((mCompareResult = mOrder.compare(mNextLeft, mNextRight)) == 0) {
                      mNextLeft = null;
                      mNextRight = null;
                  } else {
                      return mCompareResult;
                  }
              }
          } catch (NoSuchElementException e) {
              return 0;
          } catch (FetchException e) {
              try {
                  close();
              } catch (Exception e2) {
                  // Don't care.
              }
              throw e;
          }
      }
docs: Returns 0 if no next element available, {@literal <0} if next element is
  from left source cursor, and {@literal >0} if next element is from right
  source cursor.