Enum Class PageSelector
- All Implemented Interfaces:
Serializable,Comparable<PageSelector>,Constable
Page selection for fixed elements and watermarks. Page indexes used by
matchesPageIndex(int) are zero-based; a single-page document has only its first page.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatchesPageIndex(int pageIndex) Tests this selection against a zero-based renderer page index.booleanmayCoincideWith(PageSelector other) Tests whether two selections can address the same page.static PageSelectorReturns the enum constant of this class with the specified name.static PageSelector[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
FIRST
Only the first page, including a document consisting of a single page. -
FOLLOWING
Every page after the first; selects nothing in a single-page document. -
ALL
Every page, including the first.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
matchesPageIndex
public boolean matchesPageIndex(int pageIndex) Tests this selection against a zero-based renderer page index.- Parameters:
pageIndex- zero for the first page, one for the second, and so on- Returns:
- true when selected; false for every negative index
-
mayCoincideWith
Tests whether two selections can address the same page. FIRST and FOLLOWING are disjoint; ALL can coincide with either. Fixed-element collision checks use this relation.- Parameters:
other- page selection to compare; callers should supply a nonnull selector- Returns:
- true if either selector is ALL or both selectors are identical
-