Class OptionParser

java.lang.Object
org.tentackle.model.parse.OptionParser

public class OptionParser extends Object
Parses [...] options.
Author:
harald
  • Constructor Details

    • OptionParser

      public OptionParser(String text, StringBuilder other)
      Creates a parser for the given text.
      Parameters:
      text - the text to parse, usually a comment
      other - buffer that gets ignored text outside [...], null if text is not enclosed in square brackets
  • Method Details

    • nextOption

      public String nextOption()
      Gets the next option as a string.
      Returns:
      the next option, null if end of text
    • nextOption

      public String nextOption(int stopAtOptionLevel)
      Gets the next option as a string.
      Parameters:
      stopAtOptionLevel - option level to stop on closing bracket
      Returns:
      the next option, null if end of text