Class CommandHideShowColumns

java.lang.Object
net.sourceforge.plantuml.command.UBrexSingleLineCommand2<GanttDiagram>
net.sourceforge.plantuml.gantt.command.CommandHideShowColumns
All Implemented Interfaces:
Command<GanttDiagram>

public class CommandHideShowColumns extends UBrexSingleLineCommand2<GanttDiagram>
  • Constructor Details

    • CommandHideShowColumns

      public CommandHideShowColumns()
  • Method Details

    • explainArg

      protected String explainArg(LineLocation location, RegexResult arg)
      Specified by:
      explainArg in class UBrexSingleLineCommand2<GanttDiagram>
    • executeArg

      protected CommandExecutionResult executeArg(GanttDiagram diagram, LineLocation location, RegexResult arg, ParserPass currentPass)
      Specified by:
      executeArg in class UBrexSingleLineCommand2<GanttDiagram>
    • mandatoryFirstTokensSlow

      public Collection<String> mandatoryFirstTokensSlow()
      Description copied from interface: Command
      The first tokens a line must start with for this command to have any chance of matching it, as StringLocated#getFirstToken computes 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 with FirstTokens, which keeps the regex the only place the command says what it accepts. It is not the one used to dispatch lines: see Command.mandatoryFirstTokensFast(), which must agree with it (checked by Command.mandatoryFirstTokens() when assertions are enabled).
    • mandatoryFirstTokensFast

      public Collection<String> mandatoryFirstTokensFast()
      Description copied from interface: Command
      The same answer as Command.mandatoryFirstTokensSlow(), written by hand so that it costs nothing to get. Returning null (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.