Top Description Methods
jdk.internal.org.commonmark.parser.delimiter

public Interface DelimiterRun

Known Direct Implementers
jdk.internal.org.commonmark.internal.Delimiter
Imports
jdk.internal.org.commonmark.node.Text

A delimiter run is one or more of the same delimiter character, e.g. ***.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

whether this can close a delimiter
canClose
()

public boolean

Returns:

whether this can open a delimiter
canOpen
()

public Text

Returns:

the innermost closing delimiter, e.g. for *** this is the first *
getCloser
()

public Iterable<Text>
getClosers(int length)

Get the closing delimiter nodes for the specified length of delimiters.

public Text

Returns:

the innermost opening delimiter, e.g. for *** this is the last *
getOpener
()

public Iterable<Text>
getOpeners(int length)

Get the opening delimiter nodes for the specified length of delimiters.

public int

Returns:

the number of characters in this delimiter run (that are left for processing)
length
()

public int

Returns:

the number of characters originally in this delimiter run; at the start of processing, this is the same as {length()}
originalLength
()

Method Detail

canCloseback to summary
public boolean canClose()
Returns:boolean

whether this can close a delimiter

canOpenback to summary
public boolean canOpen()
Returns:boolean

whether this can open a delimiter

getCloserback to summary
public Text getCloser()
Returns:Text

the innermost closing delimiter, e.g. for *** this is the first *

getClosersback to summary
public Iterable<Text> getClosers(int length)

Get the closing delimiter nodes for the specified length of delimiters. Length must be between 1 and length().

For example, for a delimiter run ***, calling this with 1 would return the first *. Calling it with 2 would return the first * and the second *.

getOpenerback to summary
public Text getOpener()
Returns:Text

the innermost opening delimiter, e.g. for *** this is the last *

getOpenersback to summary
public Iterable<Text> getOpeners(int length)

Get the opening delimiter nodes for the specified length of delimiters. Length must be between 1 and length().

For example, for a delimiter run ***, calling this with 1 would return the last *. Calling it with 2 would return the second last * and the last *.

lengthback to summary
public int length()
Returns:int

the number of characters in this delimiter run (that are left for processing)

originalLengthback to summary
public int originalLength()
Returns:int

the number of characters originally in this delimiter run; at the start of processing, this is the same as {length()}