All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vladsch.flexmark.ext.tables.TableBlock Maven / Gradle / Ivy

There is a newer version: 4.15.102
Show newest version
package com.vladsch.flexmark.ext.tables;

import com.vladsch.flexmark.util.ast.BlankLineBreakNode;
import com.vladsch.flexmark.util.ast.Block;
import com.vladsch.flexmark.util.ast.BlockContent;
import com.vladsch.flexmark.util.ast.Node;
import com.vladsch.flexmark.util.sequence.BasedSequence;
import org.jetbrains.annotations.NotNull;

import java.util.List;

/**
 * Table block containing a {@link TableHead} and optionally a {@link TableBody}.
 */
public class TableBlock extends Block implements BlankLineBreakNode {
    public TableBlock() {
    }

    public TableBlock(BasedSequence chars) {
        super(chars);
    }

    public TableBlock(BasedSequence chars, List lineSegments) {
        super(chars, lineSegments);
    }

    public TableBlock(List lineSegments) {
        super(lineSegments);
    }

    public TableBlock(BlockContent blockContent) {
        super(blockContent);
    }

    @NotNull
    @Override
    public BasedSequence[] getSegments() {
        return new BasedSequence[0];
    }

    TableCaption getCaption() {
        Node child = getLastChild();
        return child instanceof TableCaption ? (TableCaption) child : null;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy