Top Inners Fields Constructors Methods
com.vladsch.flexmark.util.format

public Class MarkdownTable

extends Object
Class Inheritance
Annotations
@SuppressWarnings:WeakerAccess
Imports
com.vladsch.flexmark.util.ast.Node, .TextCollectingVisitor, com.vladsch.flexmark.util.collection.MaxAggregator, .MinAggregator, com.vladsch.flexmark.util.data.DataHolder, com.vladsch.flexmark.util.format.options.DiscretionaryText, com.vladsch.flexmark.util.html.CellAlignment, com.vladsch.flexmark.util.misc.*, com.vladsch.flexmark.util.sequence.*, org.jetbrains.annotations.NotNull, .Nullable, java.util.ArrayList, .BitSet, .Comparator, .List, java.util.function.BiFunction

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public static class

Field Summary

Modifier and TypeField and Description
private CellAlignment[]
private final TableSection[]
private final TableSection[]
private final TableSection[]
private final TableSection[]
public static final NumericSuffixPredicate
public static final NumericSuffixPredicate
private final TableSection[]
public final TableSection
public final TableSection
public static final CharPredicate
private int[]
pack-priv CharSequence
public final TableSection
private boolean
private boolean
public static final NumericSuffixPredicate
public TableFormatOptions
public final TableSection
private final CharSequence
private final @NotNull ArrayList<TrackedOffset>

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
addCell(@NotNull TableCell
cell to add
cell
)

public boolean
addTrackedOffset(int offset)
Deprecated Use addTrackedOffset(TrackedOffset) To create: TrackedOffset.track(offset)

public boolean
addTrackedOffset(int offset, boolean afterSpace)
Deprecated Use addTrackedOffset(TrackedOffset) To create: TrackedOffset.track(offset, afterSpace)

public boolean
addTrackedOffset(int offset, boolean afterSpace, boolean afterDelete)
Deprecated Use addTrackedOffset(TrackedOffset) To create: TrackedOffset.track(offset, afterSpace, afterDelete)

public boolean
addTrackedOffset(int offset, Character c, boolean afterDelete)
Deprecated Use addTrackedOffset(TrackedOffset) To create: TrackedOffset.track(offset, c, afterDelete)

public boolean
private CellAlignment
private int
aggregateTotalColumnsWithoutColumns(TableSection[] sections, BiFunction<Integer, Integer, Integer> aggregator, int... skipColumns)

private int
aggregateTotalColumnsWithoutRows(TableSection[] sections, BiFunction<Integer, Integer, Integer> aggregator, int... skipRows)

private void
appendColumnSpan(LineAppendable out, int span, int cellInsideEndOffset, int trackedSpanOffset)

pack-priv int
appendDashes(LineAppendable out, int dashCount, BasedSequence sepDashes, int dashOffset)

public static void
private void
appendRows(LineAppendable out, List<TableRow> rows, boolean isHeader, CharSequence linePrefix)

public void
private BasedSequence
cellText(List<TableCell> cells, int index, boolean withTrackedOffset, boolean isHeader, int width, CellAlignment alignment, Ref<Integer> delta)

public void
deleteColumns(int column, int count)

public void
deleteRows(int rowIndex, int count)

public void
public void
public void
private @Nullable TrackedOffset
findTrackedOffset(int offset)

public void
public void
forAllBodyRows(int startIndex, TableRowManipulator manipulator)

public void
forAllBodyRows(int startIndex, int count, TableRowManipulator manipulator)

public void
public void
forAllContentRows(int startIndex, TableRowManipulator manipulator)

public void
forAllContentRows(int startIndex, int count, TableRowManipulator manipulator)

public void
public void
forAllHeaderRows(int startIndex, TableRowManipulator manipulator)

public void
forAllHeaderRows(int startIndex, int count, TableRowManipulator manipulator)

public void
public void
forAllRows(int startIndex, TableRowManipulator manipulator)

public void
forAllRows(int startIndex, int count, TableRowManipulator manipulator)

public void
public void
forAllSectionRows(int startIndex, TableRowManipulator manipulator)

public void
forAllSectionRows(int startIndex, int count, TableRowManipulator manipulator)

private void
forAllSectionsRows(int startIndex, int count, TableSection[] sections, TableRowManipulator manipulator)

public static String
public List<TableRow>
public int
public List<TableRow>
public int
public TableSection
getAllRowsSection(int index)

public List<TableRow>
private List<TableRow>
public int
public int
public BasedSequence
public TableCell
public int
public TableCellOffsetInfo
getCellOffsetInfo(int offset)

public CharSequence
public boolean
public boolean
public int
public int
public int
public int
getMaxColumnsWithoutColumns(boolean withSeparator, int... skipColumns)

public int
getMaxColumnsWithoutRows(boolean withSeparator, int... skipRows)

public int
public int
public int
public int
getMinColumnsWithoutColumns(boolean withSeparator, int... skipColumns)

public int
getMinColumnsWithoutRows(boolean withSeparator, int... skipRows)

public int
public CharSequence
public int
public @Nullable TrackedOffset
getTrackedOffset(int offset)

public int
public @NotNull List<TrackedOffset>
public void
insertColumns(int column, int count)

public void
insertRows(int rowIndex, int count)

private void
insertRows(ArrayList<TableRow> rows, int index, int count, int maxColumns)

public boolean

Returns:

true if row is empty or is a separator row
isAllRowsEmptyAt
(int
index in allRows list
rowIndex
)

Test a row for having all empty columns

public boolean
isAllRowsSeparator(int index)

public boolean

Returns:

true if row is empty or is a separator row
isContentRowsEmptyAt
(int
index in allRows list
rowIndex
)

Test a row for having all empty columns

public boolean

Returns:

true if column is empty for all rows, separator row excluded
isEmptyColumn
(int
index in allRows list
column
)

Test all rows for having given column empty.

private boolean

Returns:

true if row is empty or is a separator row
isEmptyRowAt
(int
index in allRows list
rowIndex
,
TableSection[]
sections to use for rows array generation
sections
)

Test a row for having all empty columns

public boolean
public void
moveColumn(int fromColumn, int toColumn)

public void
public void
private boolean
private boolean
public void
public void
public void
public void
setCaptionWithMarkers(Node tableCellNode, CharSequence captionOpen, CharSequence caption, CharSequence captionClose)

public void
setFormatTableIndentPrefix(CharSequence formatTableIndentPrefix)

public void
setHeader(boolean header)

public void
public void
setSeparator(boolean separator)

public void
private boolean
setTrackedOffsetIndex(int offset, int index)

public MarkdownTable

Returns:

sorted table
sorted
(ColumnSort[]
column sort information
columnSorts
,
int
collection flags to use for collecting cell text
textCollectionFlags
,
@Nullable NumericSuffixPredicate
predicate to test non-numeric suffix of numeric column content, return true if suffix is acceptable, null will result in all suffixes being accepted
numericSuffixTester
)

Sort table

private int
spanFixedWidth(BitSet unfixedColumns, int col, int columnSpan)

private int
spanWidth(int col, int columnSpan)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public MarkdownTable

Returns:

transposed table
transposed
(int
number of first columns to use as header rows, 0..maxColumns
columnHeaders
)

Transpose table

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait