Class OptionParser


  • public class OptionParser
    extends java.lang.Object
    Parses [...] options.
    Author:
    harald
    • Constructor Summary

      Constructors 
      Constructor Description
      OptionParser​(java.lang.String text, boolean checkBrackets)
      Creates a parser for the given text.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String nextOption()
      Gets the next option as a string.
      java.lang.String nextOption​(int stopAtOptionLevel)
      Gets the next option as a string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OptionParser

        public OptionParser​(java.lang.String text,
                            boolean checkBrackets)
        Creates a parser for the given text.
        Parameters:
        text - the text to parse
        checkBrackets - true if ignore text outside [...]
    • Method Detail

      • nextOption

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

        public java.lang.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