package org.zwobble.mammoth.internal.documents; import java.util.List; public class Document implements DocumentElement, HasChildren { private final List children; private final Notes notes; private final List comments; public Document(List children, Notes notes, List comments) { this.children = children; this.notes = notes; this.comments = comments; } @Override public List getChildren() { return children; } @Override public DocumentElement replaceChildren(List newChildren) { return new Document(newChildren, this.notes, this.comments); } @Override public T accept(DocumentElementVisitor visitor, U context) { return visitor.visit(this, context); } public Notes getNotes() { return notes; } public List getComments() { return comments; } }