public class DocumentByWeakRefInstruction extends Object implements Instruction
InstructionExecutor
to jump to a Document
. The target
Document
instance is held as a WeakReference
within this class.
A typical execution result of this instruction would be to display the target document to the user in some fashion.
Constructor and Description |
---|
DocumentByWeakRefInstruction(Document doc)
Creates a new instance pointing to the given
Document . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Document |
getDocument() |
String |
getType() |
int |
hashCode() |
String |
toString() |
public static final String TYPE
public DocumentByWeakRefInstruction(Document doc)
Document
.doc
- this instruction's target Document
. The instruction will retain a
WeakReference
it. Must not be null
.public String getType()
getType
in interface Instruction
public Document getDocument()
Document
to jump to, or null
if the WeakReference
returns null
. This is usually the case when the Document
was
garbage collected.Copyright © 2024 levigo holding gmbh. All rights reserved.