void (OptComponent component, StringBuilder builder) { if (component instanceof OptCheckbox checkbox) { builder.append(OPT_PANE + ".checkbox("); builder.append(checkbox.bindId()).append(", "); builder.append(checkbox.label().label()); for (OptComponent child : checkbox.children()) { builder.append(",\n"); serialize(child, builder); } builder.append(")"); } if (component instanceof OptNumber number) { builder.append(OPT_PANE + ".number("); builder.append(number.bindId()).append(", "); builder.append(number.splitLabel().label()).append(", "); builder.append(LongRangeSet.point(number.minValue()).getPresentationText(LongRangeSet.all())).append(", "); builder.append(LongRangeSet.point(number.maxValue()).getPresentationText(LongRangeSet.all())); builder.append(")"); } }