package bjc.rgens.parser; import bjc.rgens.parser.elements.CaseElement; import bjc.utils.funcdata.IList; import java.util.List; /** * A rule case that inserts nothing in between case elements. * * @author Ben Culkin */ public class FlatRuleCase extends RuleCase { /** * Create a new flat rule case. * * @param elms * The case elements that make up this case. */ public FlatRuleCase(List elms) { super(elms); } @Override public void generate(GenerationState state) { for(CaseElement elm : elementList) { elm.generate(state); } } /** * Create a new flat rule case with the given case elements. * * @param elms * The elements to use for the rule case. * * @return A flat rule case, with the given elements. */ public FlatRuleCase withElements(List elms) { return new FlatRuleCase(elms); } }