org.sejda.model.pdf.page
Class PageRange
java.lang.Object
org.sejda.model.pdf.page.PageRange
- All Implemented Interfaces:
- PagesSelection
@EndGreaterThenOrEqualToStart
public class PageRange
- extends Object
- implements PagesSelection
Model for range of pages.
- Author:
- Andrea Vacondio
|
Constructor Summary |
PageRange(int start)
Creates a page range that starts at the given page and ends when the document ends. |
PageRange(int start,
int end)
Creates a page range that goes from start to end (comprehended). |
PageRange
public PageRange(int start,
int end)
- Creates a page range that goes from start to end (comprehended).
- Parameters:
start - end -
PageRange
public PageRange(int start)
- Creates a page range that starts at the given page and ends when the document ends.
- Parameters:
start -
getStart
public int getStart()
getEnd
public int getEnd()
isUnbounded
public boolean isUnbounded()
- Returns:
- true of this page range has a start but not an end.
intersects
public boolean intersects(PageRange range)
- Parameters:
range -
- Returns:
true if the input range intersect this PageRange instance.
getPages
public SortedSet<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 ordered using their natural ordering.
- 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.