Package org.commonmark.parser.delimiter
Interface DelimiterRun
- All Known Implementing Classes:
Delimiter
public interface DelimiterRun
A delimiter run is one or more of the same delimiter character, e.g.
***.-
Method Summary
Modifier and TypeMethodDescriptionbooleancanClose()booleancanOpen()getClosers(int length) Get the closing delimiter nodes for the specified length of delimiters.getOpeners(int length) Get the opening delimiter nodes for the specified length of delimiters.intlength()int
-
Method Details
-
canOpen
boolean canOpen()- Returns:
- whether this can open a delimiter
-
canClose
boolean canClose()- Returns:
- whether this can close a delimiter
-
length
int length()- Returns:
- the number of characters in this delimiter run (that are left for processing)
-
originalLength
int originalLength()- Returns:
- the number of characters originally in this delimiter run; at the start of processing, this is the same
as {
length()}
-
getOpener
Text getOpener()- Returns:
- the innermost opening delimiter, e.g. for
***this is the last*
-
getCloser
Text getCloser()- Returns:
- the innermost closing delimiter, e.g. for
***this is the first*
-
getOpeners
Get the opening delimiter nodes for the specified length of delimiters. Length must be between 1 andlength().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*. -
getClosers
Get the closing delimiter nodes for the specified length of delimiters. Length must be between 1 andlength().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*.
-