Package com.itextpdf.kernel.utils
Class PageRange.PageRangePartAnd
- java.lang.Object
-
- com.itextpdf.kernel.utils.PageRange.PageRangePartAnd
-
- All Implemented Interfaces:
PageRange.IPageRangePart
- Enclosing class:
- PageRange
public static class PageRange.PageRangePartAnd extends java.lang.Object implements PageRange.IPageRangePart
Class for range part based on several range parts. A 'and' is performed between all conditions. This allows for example to configure odd pages between page 19 and 25.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<PageRange.IPageRangePart>
conditions
-
Constructor Summary
Constructors Constructor Description PageRangePartAnd(PageRange.IPageRangePart... conditions)
Creates newPageRange.PageRangePartAnd
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.util.List<java.lang.Integer>
getAllPagesInRange(int nbPages)
Gets the list of pages that have been added to the range part so far.int
hashCode()
boolean
isPageInRange(int pageNumber)
Checks if a given page is present in the range part built so far.
-
-
-
Field Detail
-
conditions
private final java.util.List<PageRange.IPageRangePart> conditions
-
-
Constructor Detail
-
PageRangePartAnd
public PageRangePartAnd(PageRange.IPageRangePart... conditions)
Creates newPageRange.PageRangePartAnd
instance.- Parameters:
conditions
-PageRange.IPageRangePart
conditions to combine several range parts, e.g. to configure odd pages between page 19 and 25
-
-
Method Detail
-
getAllPagesInRange
public java.util.List<java.lang.Integer> getAllPagesInRange(int nbPages)
Description copied from interface:PageRange.IPageRangePart
Gets the list of pages that have been added to the range part so far.- Specified by:
getAllPagesInRange
in interfacePageRange.IPageRangePart
- Parameters:
nbPages
- number of pages of the document to get the pages, to list only the pages eligible for this document- Returns:
- the list containing page numbers added to the range part matching this document
-
isPageInRange
public boolean isPageInRange(int pageNumber)
Description copied from interface:PageRange.IPageRangePart
Checks if a given page is present in the range part built so far.- Specified by:
isPageInRange
in interfacePageRange.IPageRangePart
- Parameters:
pageNumber
- the page number to check- Returns:
true
if the page is present in this range,false
otherwise
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-