@Test public void testHasToc() { MergeParameters params = new MergeParameters(); params.setTableOfContentsPolicy(ToCPolicy.DOC_TITLES); TableOfContentsCreator victim = new TableOfContentsCreator(params, new PDDocument()); assertFalse(victim.hasToc()); victim.appendItem("text", 10, new PDPage()); assertTrue(victim.hasToc()); }
public boolean hasToc() { return !items.isEmpty(); }
TableOfContentsCreator { public boolean hasToc() { return !items.isEmpty(); } }
TableOfContentsCreator { public boolean hasToc() { return !items.isEmpty(); } TableOfContentsCreator(MergeParameters params, PDDocument document); }
TableOfContentsCreator { public boolean hasToc() { return !items.isEmpty(); } TableOfContentsCreator(MergeParameters params, PDDocument document); void appendItem(String text, long pageNumber, PDPage page); void addToC(); void addToC(int beforePageNumber); boolean hasToc(); boolean shouldGenerateToC(); void pageSizeIfNotSet(PDRectangle pageSize); float getFontSize(); long tocNumberOfPages(); }
TableOfContentsCreator { public boolean hasToc() { return !items.isEmpty(); } TableOfContentsCreator(MergeParameters params, PDDocument document); void appendItem(String text, long pageNumber, PDPage page); void addToC(); void addToC(int beforePageNumber); boolean hasToc(); boolean shouldGenerateToC(); void pageSizeIfNotSet(PDRectangle pageSize); float getFontSize(); long tocNumberOfPages();  }