code: public Iterator<E> iterator ()
      {
          // the crazy sanity checks
          if (_size < 0 || _size > _entries.length || (_size > 0 && _entries[_size-1] == null)) {
              log.warning("DSet in a bad way", "size", _size, "entries", _entries, new Exception());
          }
  
          return new Iterator<E>() {
              public boolean hasNext () {
                  checkComodification();
                  return (_index < _size);
              }
              public E next () {
                  checkComodification();
                  return _entries[_index++];
              }
              public void remove () {
                  throw new UnsupportedOperationException();
              }
              protected void checkComodification () {
                  if (_modCount != _expectedModCount) {
                      throw new ConcurrentModificationException();
                  }
                  if (_ssize != _size) {
                      log.warning("Size changed during iteration", "ssize", _ssize, "nsize", _size,
                                  "entries", _entries, new Exception());
                  }
              }
              protected int _index = 0;
              protected int _ssize = _size;
              protected int _expectedModCount = _modCount;
          };
      }
docs: Returns an iterator over the entries of this set. It does not support modification (nor
  iteration while modifications are being made to the set). It should not be kept around as it
  can quickly become out of date.