code: @Override
      public boolean hasNext() {
          resetToLastKey();
          long key = mNextKey;
          if (key != NULL_NODE) {
              moveTo(mNextKey);
              while (((ITreeStructData)getNode()).hasFirstChild() && key != mLastParent.peek()) {
                  mLastParent.push(key);
                  key = ((ITreeStructData)getNode()).getFirstChildKey();
                  moveTo(((ITreeStructData)getNode()).getFirstChildKey());
              }
              if (key == mLastParent.peek()) {
                  mLastParent.pop();
              }
  
              if (((ITreeStructData)getNode()).hasRightSibling()) {
                  mNextKey = ((ITreeStructData)getNode()).getRightSiblingKey();
  
              } else {
                  mNextKey = mLastParent.peek();
              }
  
              return true;
  
          } else {
              resetToStartKey();
              return false;
          }
      }
docs: {@inheritDoc}