APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.org.commonmark.internal

pack-priv Class StaggeredDelimiterProcessor

extends Object
implements DelimiterProcessor
Class Inheritance
All Implemented Interfaces
jdk.internal.org.commonmark.parser.delimiter.DelimiterProcessor
Imports
jdk.internal.org.commonmark.parser.delimiter.DelimiterProcessor, .DelimiterRun, java.util.LinkedList, .ListIterator

An implementation of DelimiterProcessor that dispatches all calls to two or more other DelimiterProcessors depending on the length of the delimiter run. All child DelimiterProcessors must have different minimum lengths. A given delimiter run is dispatched to the child with the largest acceptable minimum length. If no child is applicable, the one with the largest minimum length is chosen.

Field Summary

Modifier and TypeField and Description
private final char
private int
private LinkedList<DelimiterProcessor>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
private DelimiterProcessor
findProcessor(int len)

public char
public int
getMinLength()

Implements jdk.internal.org.commonmark.parser.delimiter.DelimiterProcessor.getMinLength.

Minimum number of delimiter characters that are needed to activate this.

public char
public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delimback to summary
private final char delim
minLengthback to summary
private int minLength
processorsback to summary
private LinkedList<DelimiterProcessor> processors

Constructor Detail

StaggeredDelimiterProcessorback to summary
pack-priv StaggeredDelimiterProcessor(char delim)

Method Detail

addback to summary
pack-priv void add(DelimiterProcessor dp)
findProcessorback to summary
private DelimiterProcessor findProcessor(int len)
getClosingCharacterback to summary
public char getClosingCharacter()

Implements jdk.internal.org.commonmark.parser.delimiter.DelimiterProcessor.getClosingCharacter.

Annotations
@Override
getMinLengthback to summary
public int getMinLength()

Implements jdk.internal.org.commonmark.parser.delimiter.DelimiterProcessor.getMinLength.

Doc from jdk.internal.org.commonmark.parser.delimiter.DelimiterProcessor.getMinLength.

Minimum number of delimiter characters that are needed to activate this. Must be at least 1.

Annotations
@Override
getOpeningCharacterback to summary
public char getOpeningCharacter()

Implements jdk.internal.org.commonmark.parser.delimiter.DelimiterProcessor.getOpeningCharacter.

Annotations
@Override
processback to summary
public int process(DelimiterRun openingRun, DelimiterRun closingRun)

Implements jdk.internal.org.commonmark.parser.delimiter.DelimiterProcessor.process.

Doc from jdk.internal.org.commonmark.parser.delimiter.DelimiterProcessor.process.

Process the delimiter runs.

The processor can examine the runs and the nodes and decide if it wants to process or not. If not, it should not change any nodes and return 0. If yes, it should do the processing (wrapping nodes, etc) and then return how many delimiters were used.

Note that removal (unlinking) of the used delimiter Text nodes is done by the caller.

Annotations
@Override