@Override
          public HTMLDocument.Iterator next() {
            final AttributeSet attributeSet = myDelegate.getAttributes();
            final int startOffset = myDelegate.getStartOffset();
            final int endOffset = myDelegate.getEndOffset();
            final HTML.Tag tag = myDelegate.getTag();
            HTMLDocument.Iterator current = new HTMLDocument.Iterator() {
              @Override
              public AttributeSet getAttributes() {
                return attributeSet;
              }

              @Override
              public int getStartOffset() {
                return startOffset;
              }

              @Override
              public int getEndOffset() {
                return endOffset;
              }

              @Override
              public HTML.Tag getTag() {
                return tag;
              }

              @Override
              public void next() {
                throw new IllegalStateException("Must not be called");
              }

              @Override
              public boolean isValid() {
                throw new IllegalStateException("Must not be called");
              }
            };
            myDelegate.next();
            return current;
          }
@Override
          public HTMLDocument.Iterator next()