private RuleParamType(String type, boolean multiple, String... values) { this.type = type; this.values = asList(values); StringBuilder sb = new StringBuilder(); sb.append(type); if (multiple) { sb.append(OPTION_SEPARATOR); sb.append(MULTIPLE_PARAM + PARAMETER_SEPARATOR); sb.append(Boolean.toString(multiple)); } if (values.length > 0) { sb.append(OPTION_SEPARATOR); sb.append(VALUES_PARAM + PARAMETER_SEPARATOR); sb.append(StringEscapeUtils.escapeCsv(valuesToCsv(values))); } this.key = sb.toString(); this.multiple = multiple; }
private RuleParamType(String type, boolean multiple, String... values) { this.type = type; this.values = newArrayList(values); StringBuilder sb = new StringBuilder(); sb.append(type); if (multiple) { sb.append(OPTION_SEPARATOR); sb.append(MULTIPLE_PARAM + PARAMETER_SEPARATOR); sb.append(Boolean.toString(multiple)); } if (values.length > 0) { sb.append(OPTION_SEPARATOR); sb.append(VALUES_PARAM + PARAMETER_SEPARATOR); sb.append(StringEscapeUtils.escapeCsv(valuesToCsv(values))); } this.key = sb.toString(); this.multiple = multiple; }
private RuleParamType(String type, boolean multiple, String... values) { this.type = type; this.values = asList(values); StringBuilder sb = new StringBuilder(); sb.append(type); if (multiple) { sb.append(OPTION_SEPARATOR); sb.append(MULTIPLE_PARAM + PARAMETER_SEPARATOR); sb.append(Boolean.toString(multiple)); } if (values.length > 0) { sb.append(OPTION_SEPARATOR); sb.append(VALUES_PARAM + PARAMETER_SEPARATOR); sb.append(StringEscapeUtils.escapeCsv(valuesToCsv(values))); } this.key = sb.toString(); this.multiple = multiple; }