org.sejda.model.input
Class PdfMergeInput
java.lang.Object
org.sejda.model.input.PdfMergeInput
- All Implemented Interfaces:
- PageRangeSelection, PagesSelection
@NoIntersections
public class PdfMergeInput
- extends Object
- implements PageRangeSelection, PagesSelection
Model for a input source for a merge task. It contains the source and the page selection on the source.
- Author:
- Andrea Vacondio
PdfMergeInput
public PdfMergeInput(PdfSource<?> source,
Set<PageRange> pageSelection)
PdfMergeInput
public PdfMergeInput(PdfSource<?> source)
getSource
public PdfSource<?> getSource()
getPageSelection
public Set<PageRange> getPageSelection()
- Specified by:
getPageSelection in interface PageRangeSelection
- Returns:
- an unmodifiable view of the pageSelection
addPageRange
public void addPageRange(PageRange range)
addAllPageRanges
public void addAllPageRanges(Collection<PageRange> ranges)
isAllPages
public boolean isAllPages()
- Returns:
- true if page selection for this input contains all the pages of the input source.
getPages
public Set<Integer> getPages(int totalNumberOfPage)
- Specified by:
getPages in interface PagesSelection
- Parameters:
totalNumberOfPage - the number of pages of the document (upper limit).
- Returns:
- the selected set of pages. Iteration ordering is predictable, it is the order in which elements were inserted into the
PageRange set. - See Also:
PagesSelection.getPages(int)
toString
public String toString()
- Overrides:
toString in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object other)
- Overrides:
equals in class Object
Copyright © 2013 sejda. All Rights Reserved.