void (@Nullable String valueList) { if (valueList != null) { String[] values = valueList.split(",\\s*"); List<Integer> newValues = new ArrayList<>(values.length); for (String value : values) { try { newValues.add(Integer.parseInt(value)); } catch (NumberFormatException nfe) { newValues = null; break; } } if (newValues != null) { Collections.sort(newValues); newValues = Collections.unmodifiableList(newValues); } myValues = newValues; } }