- java.lang.Object
-
- org.tentackle.model.parse.OptionParser
-
public class OptionParser extends Object
Parses [...] options.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description OptionParser(String text, StringBuilder other)Creates a parser for the given text.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringnextOption()Gets the next option as a string.StringnextOption(int stopAtOptionLevel)Gets the next option as a string.
-
-
-
Constructor Detail
-
OptionParser
public OptionParser(String text, StringBuilder other)
Creates a parser for the given text.- Parameters:
text- the text to parse, usually a commentother- buffer that gets ignored text outside [...], null if text is not enclosed in square brackets
-
-
Method Detail
-
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
-
-