aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/mammoth/documents/Paragraph.java
blob: 901eb81ade20efae0d017bef44ea84f45798a1d7 (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
package org.zwobble.mammoth.documents;

import java.util.List;
import java.util.Optional;

public class Paragraph implements DocumentElement, HasChildren {
    private final Optional<Style> style;
    private final List<DocumentElement> children;

    public Paragraph(Optional<Style> style, List<DocumentElement> children) {
        this.style = style;
        this.children = children;
    }

    public Optional<Style> getStyle() {
        return style;
    }

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

    @Override
    public <T> T accept(DocumentElementVisitor<T> visitor) {
        return visitor.visit(this);
    }
}