code: @Override
      public boolean hasNext() {
          resetToLastKey();
  
          // Fail if there is no node anymore.
          if (mNextKey == NULL_NODE) {
              resetToStartKey();
              return false;
          }
  
          // First move to next key.
          moveTo(mNextKey);
  
          // Follow right sibling if there is one.
          if (((ITreeStructData)getNode()).hasRightSibling()) {
              if (((ITreeStructData)getNode()).hasFirstChild()) {
                  mFirstChildKeyList.add(((ITreeStructData)getNode()).getFirstChildKey());
              }
              mNextKey = ((ITreeStructData)getNode()).getRightSiblingKey();
              return true;
          }
  
          // Then follow first child on stack.
          if (mFirstChildKeyList.size() > 0) {
              mNextKey = mFirstChildKeyList.remove(0);
              return true;
          }
  
          // Then follow first child if there is one.
          if (((ITreeStructData)getNode()).hasFirstChild()) {
              mNextKey = ((ITreeStructData)getNode()).getFirstChildKey();
              return true;
          }
  
          // Then end.
          mNextKey = NULL_NODE;
          return true;
      }
docs: {@inheritDoc}