code: @Override
      public boolean hasNext() {
  
          resetToLastKey();
  
          if (mFirst) {
              mFirst = false;
              try {
                  mResult = (Function.ebv(mIf, mRtx)) ? mThen : mElse;
              } catch (TTXPathException e) {
                  throw new RuntimeException(e);
              }
          }
  
          if (mResult.hasNext()) {
              return true;
          } else {
              resetToStartKey();
              return false;
          }
      }
docs: {@inheritDoc}