Package com.vladsch.flexmark.ast
Class ListItem
- 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.ListItem
-
- All Implemented Interfaces:
ParagraphContainer
,ParagraphItemContainer
,BlankLineContainer
,Content
- Direct Known Subclasses:
BulletListItem
,DefinitionItem
,DefinitionTerm
,OrderedListItem
,TaskListItem
public abstract class ListItem extends Block implements ParagraphItemContainer, BlankLineContainer, ParagraphContainer
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
containsBlankLine
private boolean
hadBlankAfterItemParagraph
protected BasedSequence
markerSuffix
protected BasedSequence
openingMarker
private int
priority
private boolean
tight
-
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
-
-
Constructor Summary
Constructors Constructor Description ListItem()
ListItem(ListItem other)
ListItem(BlockContent blockContent)
ListItem(BasedSequence chars)
ListItem(BasedSequence chars, java.util.List<BasedSequence> segments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canChangeMarker()
void
getAstExtra(@NotNull java.lang.StringBuilder out)
Node
getLastBlankLineChild()
Overridden by ListBlock and any others whose children propagate their blank line to parentBasedSequence
getMarkerSuffix()
BasedSequence
getOpeningMarker()
int
getPriority()
@NotNull BasedSequence[]
getSegments()
boolean
isContainsBlankLine()
boolean
isHadBlankAfterItemParagraph()
boolean
isInTightList()
boolean
isItemParagraph(Paragraph node)
boolean
isLoose()
boolean
isOrderedItem()
boolean
isOwnTight()
boolean
isParagraphEndWrappingDisabled(Paragraph node)
boolean
isParagraphInTightListItem(Paragraph node)
boolean
isParagraphStartWrappingDisabled(Paragraph node)
boolean
isParagraphWrappingDisabled(Paragraph node, ListOptions listOptions, DataHolder options)
boolean
isTight()
void
setContainsBlankLine(boolean containsBlankLine)
void
setHadBlankAfterItemParagraph(boolean hadBlankAfterItemParagraph)
void
setLoose(boolean loose)
void
setMarkerSuffix(BasedSequence markerSuffix)
void
setOpeningMarker(BasedSequence openingMarker)
void
setPriority(int priority)
void
setTight(boolean tight)
-
Methods inherited from class com.vladsch.flexmark.util.ast.ContentNode
getContentChars, getContentChars, getContentLines, getContentLines, getLineChars, getLineCount, getSpanningChars, setContent, setContent, setContent, 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, 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
-
-
-
-
Field Detail
-
openingMarker
protected BasedSequence openingMarker
-
markerSuffix
protected BasedSequence markerSuffix
-
tight
private boolean tight
-
hadBlankAfterItemParagraph
private boolean hadBlankAfterItemParagraph
-
containsBlankLine
private boolean containsBlankLine
-
priority
private int priority
-
-
Constructor Detail
-
ListItem
public ListItem()
-
ListItem
public ListItem(ListItem other)
-
ListItem
public ListItem(BasedSequence chars)
-
ListItem
public ListItem(BasedSequence chars, java.util.List<BasedSequence> segments)
-
ListItem
public ListItem(BlockContent blockContent)
-
-
Method Detail
-
isOrderedItem
public boolean isOrderedItem()
-
getAstExtra
public void getAstExtra(@NotNull @NotNull java.lang.StringBuilder out)
- Overrides:
getAstExtra
in classNode
-
getSegments
@NotNull public @NotNull BasedSequence[] getSegments()
- Specified by:
getSegments
in classNode
-
canChangeMarker
public boolean canChangeMarker()
-
getPriority
public int getPriority()
-
setPriority
public void setPriority(int priority)
-
getOpeningMarker
public BasedSequence getOpeningMarker()
-
setOpeningMarker
public void setOpeningMarker(BasedSequence openingMarker)
-
getMarkerSuffix
public BasedSequence getMarkerSuffix()
-
setMarkerSuffix
public void setMarkerSuffix(BasedSequence markerSuffix)
-
setTight
public void setTight(boolean tight)
-
setLoose
public void setLoose(boolean loose)
-
isTight
public boolean isTight()
-
isOwnTight
public boolean isOwnTight()
-
isLoose
public boolean isLoose()
-
isParagraphEndWrappingDisabled
public boolean isParagraphEndWrappingDisabled(Paragraph node)
- Specified by:
isParagraphEndWrappingDisabled
in interfaceParagraphContainer
-
isParagraphStartWrappingDisabled
public boolean isParagraphStartWrappingDisabled(Paragraph node)
- Specified by:
isParagraphStartWrappingDisabled
in interfaceParagraphContainer
-
isParagraphInTightListItem
public boolean isParagraphInTightListItem(Paragraph node)
- Specified by:
isParagraphInTightListItem
in interfaceParagraphItemContainer
-
isItemParagraph
public boolean isItemParagraph(Paragraph node)
- Specified by:
isItemParagraph
in interfaceParagraphItemContainer
-
isParagraphWrappingDisabled
public boolean isParagraphWrappingDisabled(Paragraph node, ListOptions listOptions, DataHolder options)
- Specified by:
isParagraphWrappingDisabled
in interfaceParagraphItemContainer
-
isInTightList
public boolean isInTightList()
-
isHadBlankAfterItemParagraph
public boolean isHadBlankAfterItemParagraph()
-
isContainsBlankLine
public boolean isContainsBlankLine()
-
setContainsBlankLine
public void setContainsBlankLine(boolean containsBlankLine)
-
setHadBlankAfterItemParagraph
public void setHadBlankAfterItemParagraph(boolean hadBlankAfterItemParagraph)
-
getLastBlankLineChild
public Node getLastBlankLineChild()
Description copied from class:Node
Overridden by ListBlock and any others whose children propagate their blank line to parent- Overrides:
getLastBlankLineChild
in classNode
- Returns:
- return a child block that can contain the parent's last blank line
-
-