summaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/mammoth/internal/documents/Document.java
blob: b1807d56e73b74e0341d650f830f834eed618cd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package org.zwobble.mammoth.internal.documents;

import java.util.List;

public class Document implements HasChildren<Document> {
    private final List<DocumentElement> children;
    private final Notes notes;
    private final List<Comment> comments;

    public Document(List<DocumentElement> children, Notes notes, List<Comment> comments) {
        this.children = children;
        this.notes = notes;
        this.comments = comments;
    }

    @Override
    public List<DocumentElement> getChildren() {
        return children;
    }

    @Override
    public Document replaceChildren(List<DocumentElement> newChildren) {
        return new Document(newChildren, this.notes, this.comments);
    }

    public Notes getNotes() {
        return notes;
    }

    public List<Comment> getComments() {
        return comments;
    }
}