Integer (String parameters) { Integer index = null; if (parameters != null && !parameters.isEmpty()) { Matcher matcher = VALUE_SOURCE_PATTERN.matcher(parameters); if (matcher.find()) { String group = matcher.group(1); try { index = Integer.parseInt(group); } catch (NumberFormatException ignored) { } } } return index; }