19 package org.turro.parser;
21 import java.util.TreeSet;
22 import org.turro.util.CompareUtil;
30 private final String macroName;
31 private final int order;
32 private final TreeSet<ParserParameter> parameters =
new TreeSet<>();
35 this.macroName = macroName;
56 return addParameter(name, optional, defaultValue,
false);
60 parameters.add(
new ParserParameter(name, optional, defaultValue, parameters.size() + 1, commaSeparated));
65 if(!parameters.isEmpty()) {
73 if(macro.getMacroName().equals(macroName)) {
82 int result = CompareUtil.compare(order, o.order);
83 if(result == 0) CompareUtil.compare(macroName, o.macroName);
void copyParametersTo(ParserMacro origin, ParserMacro destiny)
ParserMacro addPossibleValue(String value)
void copyParametersFrom(String macroName, ParserMacroSet macros)
TreeSet< ParserParameter > getParameters()
ParserMacro(String macroName, int order)
int compareTo(ParserMacro o)
ParserMacro addParameter(String name, boolean optional, String defaultValue, boolean commaSeparated)
ParserMacro addParameter(String name, boolean optional)
ParserMacro addParameter(String name, boolean optional, String defaultValue)