diff options
Diffstat (limited to 'src/main/java/org/zwobble/mammoth/internal/documents/NoteReference.java')
| -rw-r--r-- | src/main/java/org/zwobble/mammoth/internal/documents/NoteReference.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/main/java/org/zwobble/mammoth/internal/documents/NoteReference.java b/src/main/java/org/zwobble/mammoth/internal/documents/NoteReference.java new file mode 100644 index 0000000..7d0beb2 --- /dev/null +++ b/src/main/java/org/zwobble/mammoth/internal/documents/NoteReference.java @@ -0,0 +1,32 @@ +package org.zwobble.mammoth.internal.documents; + +public class NoteReference implements DocumentElement { + public static NoteReference footnoteReference(String noteId) { + return new NoteReference(NoteType.FOOTNOTE, noteId); + } + + public static NoteReference endnoteReference(String noteId) { + return new NoteReference(NoteType.ENDNOTE, noteId); + } + + private final NoteType noteType; + private final String noteId; + + public NoteReference(NoteType noteType, String noteId) { + this.noteType = noteType; + this.noteId = noteId; + } + + public NoteType getNoteType() { + return noteType; + } + + public String getNoteId() { + return noteId; + } + + @Override + public <T> T accept(DocumentElementVisitor<T> visitor) { + return visitor.visit(this); + } +} |
