aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/mammoth/internal/documents/Break.java
blob: 9076d2189197b3a8e946ba06a76ec9523a4656ca (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
package org.zwobble.mammoth.internal.documents;

public class Break implements DocumentElement {
    public enum Type {
        LINE,
        PAGE
    }

    public static final Break LINE_BREAK = new Break(Type.LINE);
    public static final Break PAGE_BREAK = new Break(Type.PAGE);

    private final Type type;

    private Break(Type type) {
        this.type = type;
    }

    public Type getType() {
        return type;
    }

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