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 sequence
endPageNumber - the finishing page number of the sequnce
public PageRange addSinglePage(int pageNumber)
pageNumber - the page number to add
public List<Integer> getAllPages()
public boolean isPageInRange(int pageNumber)
pageNumber - the page number to check
true if the page is present in this range, false otherwise
Copyright © 1998–2016 iText Group NV. All rights reserved.