class DocumentEntry
{
    private final PDDocument doc;
    private final String filename;
    
    public DocumentEntry(PDDocument doc, String filename)
    {
        this.doc = doc;
        this.filename = filename;
    }
    
    public int getPageCount()
    {
        return doc.getPages().getCount();
    }
    
    public PageEntry getPage(int index)
    {<FILL_FUNCTION_BODY>}
    
    public int indexOf(PageEntry page)
    {
        return page.getPageNum() - 1;
    }

    @Override
    public String toString()
    {
        return filename;
    }
}

        PDPage page = doc.getPages().get(index);
        String pageLabel = PDFDebugger.getPageLabel(doc, index);
        return new PageEntry(page.getCOSObject(), index + 1, pageLabel);
    
<no_super_class>