org.sejda.model.outline
Class OutlineGoToPageDestinations

java.lang.Object
  extended by org.sejda.model.outline.OutlineGoToPageDestinations

public class OutlineGoToPageDestinations
extends Object

Holder for a collection of document outline GoTo page destinations. Keeps information about the association between page number and outline title.

Author:
Andrea Vacondio

Constructor Summary
OutlineGoToPageDestinations()
           
 
Method Summary
 void addFirstPageTitle(String title)
          Adds the title for the first page.
 void addPage(Integer page, String title)
          Adds the given page destination with the given title.
 Set<Integer> getPages()
           
 String getTitle(Integer page)
           
 boolean isEmpty()
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutlineGoToPageDestinations

public OutlineGoToPageDestinations()
Method Detail

addPage

public void addPage(Integer page,
                    String title)
Adds the given page destination with the given title.

Parameters:
page -
title -
Throws:
IllegalArgumentException - if the page number is null or negative.

getPages

public Set<Integer> getPages()
Returns:
an unmodifiable view of the set of pages.

getTitle

public String getTitle(Integer page)
Parameters:
page -
Returns:
the title corresponding to the input page.

size

public int size()
Returns:
the number of destinations held.
See Also:
Map.size()

isEmpty

public boolean isEmpty()
Returns:
true if there is no destination.
See Also:
Map.isEmpty()

addFirstPageTitle

public void addFirstPageTitle(String title)
Adds the title for the first page. This page has a special meaning since we might need it even if it's not a split destination.

Parameters:
title -


Copyright © 2013 sejda. All Rights Reserved.