code: public Object next() throws java.util.NoSuchElementException {
          Object element = null;
          if (nextElement != null) {
              element = nextElement;
              nextElement = null;
          } else {
              element = getNextElement();
              if (element == null) {
                  throw new java.util.NoSuchElementException();
              }
          }
          return element;
      }
docs: Returns the next element of primary key collection.
  
  @return the next element.
  @throws NoSuchElementException
  if there are no more elements.