diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-02-24 08:16:16 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-02-24 08:16:16 +0000 |
| commit | 3e2786a004eddf968a5fa7d5a92dff5b1b5f7734 (patch) | |
| tree | 7fa1bcc1e484cd0ef782f64baf504ee83333d397 /src/main/java/org/zwobble/mammoth/internal/documents/NoteReference.java | |
| parent | 0dc3a12affc2e46c1a0df2899cf51a1ae3fdbd61 (diff) | |
Create internal package
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); + } +} |
