public class PageRange extends Object
| Constructor and Description |
|---|
PageRange()
Constructs an empty
PageRange instance. |
PageRange(String pageRange)
Constructs a
PageRange instance from a range in a string form, for example: "1-12, 15, 45-66". |
| Modifier and Type | Method and Description |
|---|---|
PageRange |
addPageSequence(int startPageNumber,
int endPageNumber)
Adds a page sequence to the range.
|
PageRange |
addSinglePage(int pageNumber)
Adds a single page to the range.
|
boolean |
equals(Object obj) |
List<Integer> |
getAllPages()
Gets the list if pages that have been added to the range so far.
|
int |
hashCode() |
boolean |
isPageInRange(int pageNumber)
Checks if a given page is present in the range built so far.
|
public PageRange()
PageRange instance.public PageRange addPageSequence(int startPageNumber, int endPageNumber)
startPageNumber - the starting page number of the sequenceendPageNumber - the finishing page number of the sequncepublic PageRange addSinglePage(int pageNumber)
pageNumber - the page number to addpublic List<Integer> getAllPages()
public boolean isPageInRange(int pageNumber)
pageNumber - the page number to checktrue if the page is present in this range, false otherwiseCopyright © 1998–2016 iText Group NV. All rights reserved.