org.sejda.model.input
Class PdfMergeInput

java.lang.Object
  extended by 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

Constructor Summary
PdfMergeInput(PdfSource<?> source)
           
PdfMergeInput(PdfSource<?> source, Set<PageRange> pageSelection)
           
 
Method Summary
 void addAllPageRanges(Collection<PageRange> ranges)
           
 void addPageRange(PageRange range)
           
 boolean equals(Object other)
           
 Set<Integer> getPages(int totalNumberOfPage)
           
 Set<PageRange> getPageSelection()
           
 PdfSource<?> getSource()
           
 int hashCode()
           
 boolean isAllPages()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PdfMergeInput

public PdfMergeInput(PdfSource<?> source,
                     Set<PageRange> pageSelection)

PdfMergeInput

public PdfMergeInput(PdfSource<?> source)
Method Detail

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.