final List resources = resourceSet.getResources(); return new Iterator() { int index = 0;  public boolean hasNext() { return index < resources.size(); }  public Object next() { return resources.get(index++); }  public void remove() { throw new UnsupportedOperationException(); } };
return resourceSetIterator = new ResourcesIterator(resourceSet.getResources());
    protected Iterator getResourceSetChildren(ResourceSet resourceSet)    {      final List resources = resourceSet.getResources();      return new Iterator()        {          int index = 0;          public boolean hasNext()          {            return index < resources.size();          }          public Object next()          {            return resources.get(index++);          }          public void remove()          {            throw new UnsupportedOperationException();          }        };    }