Class Delimiter
java.lang.Object
com.vladsch.flexmark.parser.core.delimiter.Delimiter
- All Implemented Interfaces:
DelimiterRun
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanCan close emphasis, see spec.private final booleanCan open emphasis, see spec.private final charprivate intprivate final BasedSequenceprivate booleanSkip this delimiter when looking for a link/image opener because it was already matched.private Delimiterprivate final Textprivate intprivate Delimiter -
Constructor Summary
ConstructorsConstructorDescriptionDelimiter(BasedSequence input, Text node, char delimiterChar, boolean canOpen, boolean canClose, Delimiter previous, int index) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanClose()booleancanOpen()voidconvertDelimitersToText(int delimitersUsed, Delimiter closer) charintintgetIndex()getInput()getLeadChars(int delimiterUse) getNext()getNode()intintgetTailChars(int delimiterUse) booleanintlength()voidmoveNodesBetweenDelimitersTo(DelimitedNode delimitedNode, Delimiter closer) voidsetIndex(int index) voidsetMatched(boolean matched) voidvoidsetNumDelims(int numDelims) voidsetPrevious(Delimiter previous)
-
Field Details
-
node
-
input
-
delimiterChar
private final char delimiterChar -
index
private int index -
canOpen
private final boolean canOpenCan open emphasis, see spec. -
canClose
private final boolean canCloseCan close emphasis, see spec. -
matched
private boolean matchedSkip this delimiter when looking for a link/image opener because it was already matched. -
previous
-
next
-
numDelims
private int numDelims
-
-
Constructor Details
-
Delimiter
public Delimiter(BasedSequence input, Text node, char delimiterChar, boolean canOpen, boolean canClose, Delimiter previous, int index)
-
-
Method Details
-
getPrevious
- Specified by:
getPreviousin interfaceDelimiterRun
-
getNext
- Specified by:
getNextin interfaceDelimiterRun
-
setMatched
public void setMatched(boolean matched) -
setPrevious
-
setNext
-
setNumDelims
public void setNumDelims(int numDelims) -
getDelimiterChar
public char getDelimiterChar()- Specified by:
getDelimiterCharin interfaceDelimiterRun
-
isMatched
public boolean isMatched() -
getNumDelims
public int getNumDelims() -
getNode
- Specified by:
getNodein interfaceDelimiterRun
-
getInput
-
getStartIndex
public int getStartIndex() -
getEndIndex
public int getEndIndex() -
getIndex
public int getIndex() -
setIndex
public void setIndex(int index) -
getTailChars
-
getLeadChars
-
getPreviousNonDelimiterTextNode
-
getNextNonDelimiterTextNode
-
moveNodesBetweenDelimitersTo
-
convertDelimitersToText
-
canOpen
public boolean canOpen()- Specified by:
canOpenin interfaceDelimiterRun- Returns:
- whether this can open a delimiter
-
canClose
public boolean canClose()- Specified by:
canClosein interfaceDelimiterRun- Returns:
- whether this can close a delimiter
-
length
public int length()- Specified by:
lengthin interfaceDelimiterRun- Returns:
- the number of characters in this delimiter run (that are left for processing)
-