Package org.commonmark.internal
Class Delimiter
java.lang.Object
org.commonmark.internal.Delimiter
- All Implemented Interfaces:
DelimiterRun
Delimiter (emphasis, strong emphasis or custom emphasis).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final booleanfinal charprivate final int -
Constructor Summary
Constructors -
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
-
Field Details
-
characters
-
delimiterChar
public final char delimiterChar -
originalLength
private final int originalLength -
canOpen
private final boolean canOpen -
canClose
private final boolean canClose -
previous
-
next
-
-
Constructor Details
-
Delimiter
-
-
Method Details
-
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)
-
originalLength
public int originalLength()- Specified by:
originalLengthin interfaceDelimiterRun- Returns:
- the number of characters originally in this delimiter run; at the start of processing, this is the same
as {
DelimiterRun.length()}
-
getOpener
- Specified by:
getOpenerin interfaceDelimiterRun- Returns:
- the innermost opening delimiter, e.g. for
***this is the last*
-
getCloser
- Specified by:
getCloserin interfaceDelimiterRun- Returns:
- the innermost closing delimiter, e.g. for
***this is the first*
-
getOpeners
Description copied from interface:DelimiterRunGet the opening delimiter nodes for the specified length of delimiters. Length must be between 1 andDelimiterRun.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*.- Specified by:
getOpenersin interfaceDelimiterRun
-
getClosers
Description copied from interface:DelimiterRunGet the closing delimiter nodes for the specified length of delimiters. Length must be between 1 andDelimiterRun.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*.- Specified by:
getClosersin interfaceDelimiterRun
-