public <T> List<T> parseChoices(String s, List<T> validChoices) {
		Set<String> choiceStringSet = new HashSet<>(getValues(s));
		List<T> ret = new LinkedList<>();
		for (T choice : validChoices) {
			if (choiceStringSet.contains(choice.toString())) {
				ret.add(choice);
			}
		}

		if (!ret.isEmpty()) {
			return ret;
		}

		throw new IllegalArgumentException("Invalid choices: " + s);
	}
Parses choices from a string.  The string must be surrounded by quotes, with a ';' as the
separator.

@param s The string to parse.
@param validChoices An array of valid choices.
@return The choices, if they found in the array of choices.
@throws IllegalArgumentException if the parsed string did not contain any valid choices.
Ghidra/Features/Base/src/main/java/ghidra/app/script/GhidraScript.java