public class PageByIndexInstruction extends Object implements Instruction
InstructionExecutor
to jump to the page found at a given page index. This
instruction neither gives a reference to the page object, nor does it specify which document that
page can be found in, if any. The page index held by this instruction will not be updated
automatically in case of changes (such as, for example, the reordering of pages in a document).
This is a very light-weight instruction, perfectly fit for simple use-cases that do not involve changes to a document's structure.
A typical execution result of this instruction would be to display the target page to the user in some fashion.
Constructor and Description |
---|
PageByIndexInstruction(int pageIndex) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
getPageIndex() |
String |
getType() |
int |
hashCode() |
String |
toString() |
public static final String TYPE
public PageByIndexInstruction(int pageIndex)
pageIndex
- the 0-based index of the page to jump to. No sanity-checking for negative
indices is performed.public String getType()
getType
in interface Instruction
public int getPageIndex()
Copyright © 2024 levigo holding gmbh. All rights reserved.