java.lang.Object
com.vladsch.flexmark.parser.core.delimiter.Delimiter
All Implemented Interfaces:
DelimiterRun

public class Delimiter extends Object implements DelimiterRun
  • Field Details

    • node

      private final Text node
    • input

      private final BasedSequence input
    • delimiterChar

      private final char delimiterChar
    • index

      private int index
    • canOpen

      private final boolean canOpen
      Can open emphasis, see spec.
    • canClose

      private final boolean canClose
      Can close emphasis, see spec.
    • matched

      private boolean matched
      Skip this delimiter when looking for a link/image opener because it was already matched.
    • previous

      private Delimiter previous
    • next

      private Delimiter 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

      public Delimiter getPrevious()
      Specified by:
      getPrevious in interface DelimiterRun
    • getNext

      public Delimiter getNext()
      Specified by:
      getNext in interface DelimiterRun
    • setMatched

      public void setMatched(boolean matched)
    • setPrevious

      public void setPrevious(Delimiter previous)
    • setNext

      public void setNext(Delimiter next)
    • setNumDelims

      public void setNumDelims(int numDelims)
    • getDelimiterChar

      public char getDelimiterChar()
      Specified by:
      getDelimiterChar in interface DelimiterRun
    • isMatched

      public boolean isMatched()
    • getNumDelims

      public int getNumDelims()
    • getNode

      public Text getNode()
      Specified by:
      getNode in interface DelimiterRun
    • getInput

      public BasedSequence getInput()
    • getStartIndex

      public int getStartIndex()
    • getEndIndex

      public int getEndIndex()
    • getIndex

      public int getIndex()
    • setIndex

      public void setIndex(int index)
    • getTailChars

      public BasedSequence getTailChars(int delimiterUse)
    • getLeadChars

      public BasedSequence getLeadChars(int delimiterUse)
    • getPreviousNonDelimiterTextNode

      public Text getPreviousNonDelimiterTextNode()
    • getNextNonDelimiterTextNode

      public Text getNextNonDelimiterTextNode()
    • moveNodesBetweenDelimitersTo

      public void moveNodesBetweenDelimitersTo(DelimitedNode delimitedNode, Delimiter closer)
    • convertDelimitersToText

      public void convertDelimitersToText(int delimitersUsed, Delimiter closer)
    • canOpen

      public boolean canOpen()
      Specified by:
      canOpen in interface DelimiterRun
      Returns:
      whether this can open a delimiter
    • canClose

      public boolean canClose()
      Specified by:
      canClose in interface DelimiterRun
      Returns:
      whether this can close a delimiter
    • length

      public int length()
      Specified by:
      length in interface DelimiterRun
      Returns:
      the number of characters in this delimiter run (that are left for processing)