code: public boolean hasNext() {
  
          if (items != null) {
              if (items.hasNext()) {
                  return (true);
              } else {
                  items = null;
              }
          }
          Object next = findNextValidChild();
          while (next != null) {
              initializeItems(next);
              if (items != null) {
                  return true;
              } else {
                  next = findNextValidChild();
              }
          }
          return false;
  
      }
docs: <p>Return <code>true</code> if the iteration has more elements.</p>