Package com.vladsch.flexmark.ast
Class Paragraph
- java.lang.Object
-
- com.vladsch.flexmark.util.ast.Node
-
- com.vladsch.flexmark.util.ast.ContentNode
-
- com.vladsch.flexmark.util.ast.Block
-
- com.vladsch.flexmark.ast.Paragraph
-
- All Implemented Interfaces:
Content,TextContainer
public class Paragraph extends Block implements TextContainer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vladsch.flexmark.util.ast.TextContainer
TextContainer.Flags
-
-
Field Summary
Fields Modifier and Type Field Description private static int[]EMPTY_INDENTSprivate booleanhasTableSeparatorprivate int[]lineIndentsprivate booleantrailingBlankLine-
Fields inherited from class com.vladsch.flexmark.util.ast.ContentNode
lineSegments
-
Fields inherited from class com.vladsch.flexmark.util.ast.Node
AST_ADAPTER, EMPTY_SEGMENTS, SPLICE
-
Fields inherited from interface com.vladsch.flexmark.util.ast.TextContainer
F_ADD_SPACES_BETWEEN_NODES, F_FOR_HEADING_ID, F_LINK_ANCHOR, F_LINK_NODE_TEXT, F_LINK_PAGE_REF, F_LINK_TEXT, F_LINK_TEXT_TYPE, F_LINK_URL, F_NO_TRIM_REF_TEXT_END, F_NO_TRIM_REF_TEXT_START, F_NODE_TEXT
-
-
Constructor Summary
Constructors Constructor Description Paragraph()Paragraph(BlockContent blockContent)Paragraph(BasedSequence chars)Paragraph(BasedSequence chars, java.util.List<BasedSequence> lineSegments, int[] lineIndents)Paragraph(BasedSequence chars, java.util.List<BasedSequence> lineSegments, java.util.List<java.lang.Integer> lineIndents)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollectEndText(ISequenceBuilder<? extends ISequenceBuilder<?,BasedSequence>,BasedSequence> out, int flags, NodeVisitor nodeVisitor)Append node's text ending, after any child nodes have been visited.booleancollectText(ISequenceBuilder<? extends ISequenceBuilder<?,BasedSequence>,BasedSequence> out, int flags, NodeVisitor nodeVisitor)Append node's textvoidgetAstExtra(@NotNull java.lang.StringBuilder out)intgetLineIndent(int line)int[]getLineIndents()@NotNull BasedSequence[]getSegments()booleanhasTableSeparator()booleanisTrailingBlankLine()voidsetContent(@NotNull BlockContent blockContent)voidsetContent(@NotNull BasedSequence chars, @NotNull java.util.List<BasedSequence> lineSegments)voidsetContent(@NotNull java.util.List<BasedSequence> lineSegments)voidsetContent(Paragraph other, int startLine, int endLine)voidsetContent(BlockContent blockContent, int startLine, int endLine)voidsetContent(BasedSequence chars, java.util.List<BasedSequence> lineSegments, java.util.List<java.lang.Integer> lineIndents)voidsetHasTableSeparator(boolean hasTableSeparator)voidsetLineIndents(int[] lineIndents)protected voidsetLineIndents(java.util.List<java.lang.Integer> lineIndents)voidsetTrailingBlankLine(boolean trailingBlankLine)-
Methods inherited from class com.vladsch.flexmark.util.ast.ContentNode
getContentChars, getContentChars, getContentLines, getContentLines, getLineChars, getLineCount, getSpanningChars, setContentLine, setContentLines
-
Methods inherited from class com.vladsch.flexmark.util.ast.Node
appendChain, appendChild, astChars, astExtraChars, astString, baseSubSequence, baseSubSequence, countAncestorsOfType, countDirectAncestorsOfType, delimitedSegmentSpan, delimitedSegmentSpanChars, endOfLine, extractChainTo, extractToFirstInChain, getAncestorOfType, getBaseSequence, getBlankLineSibling, getChars, getCharsFromSegments, getChildChars, getChildIterator, getChildOfType, getChildren, getDescendants, getDocument, getEmptyPrefix, getEmptySuffix, getEndLineNumber, getEndOffset, getEndOfLine, getExactChildChars, getFirstChild, getFirstChildAny, getFirstChildAnyNot, getFirstInChain, getGrandParent, getLastBlankLineChild, getLastChild, getLastChildAny, getLastChildAnyNot, getLastInChain, getLeadSegment, getLineColumnAtEnd, getLineNumber, getNext, getNextAny, getNextAnyNot, getNodeName, getNodeOfTypeIndex, getNodeOfTypeIndex, getOldestAncestorOfTypeAfter, getPrevious, getPreviousAny, getPreviousAnyNot, getReversedChildIterator, getReversedChildren, getReversedDescendants, getSegmentsForChars, getSourceRange, getStartLineNumber, getStartOffset, getStartOfLine, getTextLength, getTrailSegment, hasChildren, hasOrMoreChildren, insertAfter, insertBefore, insertChainAfter, insertChainBefore, isOrDescendantOfType, lineColumnAtIndex, lineColumnAtStart, moveTrailingBlankLines, prependChild, removeChildren, segmentSpan, segmentSpan, segmentSpanChars, segmentSpanChars, segmentSpanChars, segmentSpanCharsToVisible, setChars, setCharsFromContent, setCharsFromContentOnly, setCharsFromSegments, spanningChars, startOfLine, takeChildren, toAstString, toSegmentSpan, toString, toStringAttributes, unlink
-
-
-
-
Constructor Detail
-
Paragraph
public Paragraph()
-
Paragraph
public Paragraph(BasedSequence chars)
-
Paragraph
public Paragraph(BasedSequence chars, java.util.List<BasedSequence> lineSegments, java.util.List<java.lang.Integer> lineIndents)
-
Paragraph
public Paragraph(BasedSequence chars, java.util.List<BasedSequence> lineSegments, int[] lineIndents)
-
Paragraph
public Paragraph(BlockContent blockContent)
-
-
Method Detail
-
getSegments
@NotNull public @NotNull BasedSequence[] getSegments()
- Specified by:
getSegmentsin classNode
-
getAstExtra
public void getAstExtra(@NotNull @NotNull java.lang.StringBuilder out)- Overrides:
getAstExtrain classNode
-
setLineIndents
protected void setLineIndents(java.util.List<java.lang.Integer> lineIndents)
-
setContent
public void setContent(@NotNull @NotNull BasedSequence chars, @NotNull @NotNull java.util.List<BasedSequence> lineSegments)- Overrides:
setContentin classContentNode
-
setContent
public void setContent(BasedSequence chars, java.util.List<BasedSequence> lineSegments, java.util.List<java.lang.Integer> lineIndents)
-
setContent
public void setContent(@NotNull @NotNull java.util.List<BasedSequence> lineSegments)- Overrides:
setContentin classContentNode
-
setContent
public void setContent(@NotNull @NotNull BlockContent blockContent)- Overrides:
setContentin classContentNode
-
setContent
public void setContent(BlockContent blockContent, int startLine, int endLine)
-
setContent
public void setContent(Paragraph other, int startLine, int endLine)
-
setLineIndents
public void setLineIndents(int[] lineIndents)
-
getLineIndent
public int getLineIndent(int line)
-
getLineIndents
public int[] getLineIndents()
-
isTrailingBlankLine
public boolean isTrailingBlankLine()
-
setTrailingBlankLine
public void setTrailingBlankLine(boolean trailingBlankLine)
-
setHasTableSeparator
public void setHasTableSeparator(boolean hasTableSeparator)
-
hasTableSeparator
public boolean hasTableSeparator()
-
collectText
public boolean collectText(ISequenceBuilder<? extends ISequenceBuilder<?,BasedSequence>,BasedSequence> out, int flags, NodeVisitor nodeVisitor)
Description copied from interface:TextContainerAppend node's text- Specified by:
collectTextin interfaceTextContainer- Parameters:
out- sequence build to which to append textflags- collection flagsnodeVisitor- node visitor to use to visit children- Returns:
- true if child nodes should be visited
-
collectEndText
public void collectEndText(ISequenceBuilder<? extends ISequenceBuilder<?,BasedSequence>,BasedSequence> out, int flags, NodeVisitor nodeVisitor)
Description copied from interface:TextContainerAppend node's text ending, after any child nodes have been visited. The default implementation does nothing.- Specified by:
collectEndTextin interfaceTextContainer- Parameters:
out- sequence build to which to append textflags- collection flagsnodeVisitor- node visitor to use to visit children
-
-