<commit_before>package com.marklogic.client.impl;

import java.util.Iterator;

import com.marklogic.client.Page;
import com.marklogic.client.impl.BasicPage;
import com.marklogic.client.io.JacksonPojoHandle;
import com.marklogic.client.document.DocumentPage;
import com.marklogic.client.pojo.PojoPage;

public class PojoPageImpl<T> extends BasicPage<T> implements PojoPage<T>, Iterator<T> {
    private Class<T> entityClass;
    private DocumentPage docPage;

    public PojoPageImpl(DocumentPage docPage, Class<T> entityClass) {
        super(entityClass);
        setStart( docPage.getStart() );
        setPageSize( docPage.getPageSize() );
        setTotalSize( docPage.getTotalSize() );

        this.docPage = docPage;
        this.entityClass = entityClass;
    }

    @Override
    public Iterator<T> iterator() {
        return this;
    }

    @Override
    public boolean hasNext() {
        return docPage.hasNext();
    }

    @Override
    public T next() {
        return docPage.nextContent(new JacksonPojoHandle<T>(entityClass)).get();
    }
}
<commit_msg>in Java 7 I need to implement the remove() method<commit_after>package com.marklogic.client.impl;

import java.util.Iterator;

import com.marklogic.client.Page;
import com.marklogic.client.impl.BasicPage;
import com.marklogic.client.io.JacksonPojoHandle;
import com.marklogic.client.document.DocumentPage;
import com.marklogic.client.pojo.PojoPage;

public class PojoPageImpl<T> extends BasicPage<T> implements PojoPage<T>, Iterator<T> {
    private Class<T> entityClass;
    private DocumentPage docPage;

    public PojoPageImpl(DocumentPage docPage, Class<T> entityClass) {
        super(entityClass);
        setStart( docPage.getStart() );
        setPageSize( docPage.getPageSize() );
        setTotalSize( docPage.getTotalSize() );

        this.docPage = docPage;
        this.entityClass = entityClass;
    }

    @Override
    public Iterator<T> iterator() {
        return this;
    }

    @Override
    public boolean hasNext() {
        return docPage.hasNext();
    }

    @Override
    public T next() {
        return docPage.nextContent(new JacksonPojoHandle<T>(entityClass)).get();
    }

    @Override
    public void remove() {
        throw new UnsupportedOperationException();
    }
}

{'fraction_non_alphanumeric': 0.10618692408951294, 'fraction_numerical': 0.00043878894251864854, 'mean_word_length': 3.351145038167939, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6611556', 'n_tokens_mistral': 708, 'n_tokens_neox': 681, 'n_words': 142}