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 booleancontainsBlankLineprivate booleanhadBlankAfterItemParagraphprotected BasedSequencemarkerSuffixprotected BasedSequenceopeningMarkerprivate intpriorityprivate booleantight-
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 booleancanChangeMarker()voidgetAstExtra(@NotNull java.lang.StringBuilder out)NodegetLastBlankLineChild()Overridden by ListBlock and any others whose children propagate their blank line to parentBasedSequencegetMarkerSuffix()BasedSequencegetOpeningMarker()intgetPriority()@NotNull BasedSequence[]getSegments()booleanisContainsBlankLine()booleanisHadBlankAfterItemParagraph()booleanisInTightList()booleanisItemParagraph(Paragraph node)booleanisLoose()booleanisOrderedItem()booleanisOwnTight()booleanisParagraphEndWrappingDisabled(Paragraph node)booleanisParagraphInTightListItem(Paragraph node)booleanisParagraphStartWrappingDisabled(Paragraph node)booleanisParagraphWrappingDisabled(Paragraph node, ListOptions listOptions, DataHolder options)booleanisTight()voidsetContainsBlankLine(boolean containsBlankLine)voidsetHadBlankAfterItemParagraph(boolean hadBlankAfterItemParagraph)voidsetLoose(boolean loose)voidsetMarkerSuffix(BasedSequence markerSuffix)voidsetOpeningMarker(BasedSequence openingMarker)voidsetPriority(int priority)voidsetTight(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:
getAstExtrain classNode
-
getSegments
@NotNull public @NotNull BasedSequence[] getSegments()
- Specified by:
getSegmentsin 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:
isParagraphEndWrappingDisabledin interfaceParagraphContainer
-
isParagraphStartWrappingDisabled
public boolean isParagraphStartWrappingDisabled(Paragraph node)
- Specified by:
isParagraphStartWrappingDisabledin interfaceParagraphContainer
-
isParagraphInTightListItem
public boolean isParagraphInTightListItem(Paragraph node)
- Specified by:
isParagraphInTightListItemin interfaceParagraphItemContainer
-
isItemParagraph
public boolean isItemParagraph(Paragraph node)
- Specified by:
isItemParagraphin interfaceParagraphItemContainer
-
isParagraphWrappingDisabled
public boolean isParagraphWrappingDisabled(Paragraph node, ListOptions listOptions, DataHolder options)
- Specified by:
isParagraphWrappingDisabledin 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:NodeOverridden by ListBlock and any others whose children propagate their blank line to parent- Overrides:
getLastBlankLineChildin classNode- Returns:
- return a child block that can contain the parent's last blank line
-
-