Class CommandPrintBetween
java.lang.Object
net.sourceforge.plantuml.command.UBrexSingleLineCommand2<GanttDiagram>
net.sourceforge.plantuml.gantt.command.CommandPrintBetween
- All Implemented Interfaces:
Command<GanttDiagram>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CommandExecutionResultexecuteArg(GanttDiagram diagram, LineLocation location, RegexResult arg, ParserPass currentPass) protected StringexplainArg(LineLocation location, RegexResult arg) The same answer asCommand.mandatoryFirstTokensSlow(), written by hand so that it costs nothing to get.The first tokens a line must start with for this command to have any chance of matching it, asStringLocated#getFirstTokencomputes it: the lower-cased run of letters the line opens with, or its first character alone for a line that opens with anything else (""},"="for "==","&", each digit...), or""for a blank line.Methods inherited from class net.sourceforge.plantuml.command.UBrexSingleLineCommand2
execute, explain, finalVerification, isEligibleFor, isForbidden, isValid, syntaxWithFinalBracketMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sourceforge.plantuml.command.Command
isCommandForbidden, mandatoryFirstTokens
-
Constructor Details
-
CommandPrintBetween
public CommandPrintBetween()
-
-
Method Details
-
explainArg
- Specified by:
explainArgin classUBrexSingleLineCommand2<GanttDiagram>
-
executeArg
protected CommandExecutionResult executeArg(GanttDiagram diagram, LineLocation location, RegexResult arg, ParserPass currentPass) - Specified by:
executeArgin classUBrexSingleLineCommand2<GanttDiagram>
-
mandatoryFirstTokensSlow
Description copied from interface:CommandThe first tokens a line must start with for this command to have any chance of matching it, asStringLocated#getFirstTokencomputes it: the lower-cased run of letters the line opens with, or its first character alone for a line that opens with anything else (""},"="for "==","&", each digit...), or""for a blank line. This is the slow, reference answer: a command built on one of the usual base classes reads it from its own pattern withFirstTokens, which keeps the regex the only place the command says what it accepts. It is not the one used to dispatch lines: seeCommand.mandatoryFirstTokensFast(), which must agree with it (checked byCommand.mandatoryFirstTokens()when assertions are enabled). -
mandatoryFirstTokensFast
Description copied from interface:CommandThe same answer asCommand.mandatoryFirstTokensSlow(), written by hand so that it costs nothing to get. Returningnull(FirstTokens.ANYTHING) means "I can match any line" and keeps the command in the list tried for every token nobody claimed. That is the safe answer: a command that declares too much only costs the regex attempts it could have skipped, while one that declares too few of its tokens stops being reachable for the ones it left out. A non-null set is never empty in practice: it would mean the command matches no line at all.
-