private int[] getPathParameterBounds(final String name) { final Iterator<UriTemplate> templatesIterator = templates.iterator(); final Iterator<MatchResult> matchResultsIterator = matchResults.iterator(); while (templatesIterator.hasNext()) { MatchResult mr = matchResultsIterator.next(); // Find the index of path parameter final int pIndex = getLastPathParameterIndex(name, templatesIterator.next()); if (pIndex != -1) { int pathLength = mr.group().length(); int segmentIndex = mr.end(pIndex + 1); final int groupLength = segmentIndex - mr.start(pIndex + 1); // Find the absolute position of the end of the // capturing group in the request path while (matchResultsIterator.hasNext()) { mr = matchResultsIterator.next(); segmentIndex += mr.group().length() - pathLength; pathLength = mr.group().length(); } return new int[] {segmentIndex - groupLength, segmentIndex}; } } return null; }
private int[] getPathParameterBounds(final String name) { final Iterator<UriTemplate> templatesIterator = templates.iterator(); final Iterator<MatchResult> matchResultsIterator = matchResults.iterator(); while (templatesIterator.hasNext()) { MatchResult mr = matchResultsIterator.next(); // Find the index of path parameter final int pIndex = getLastPathParameterIndex(name, templatesIterator.next()); if (pIndex != -1) { int pathLength = mr.group().length(); int segmentIndex = mr.end(pIndex + 1); final int groupLength = segmentIndex - mr.start(pIndex + 1); // Find the absolute position of the end of the // capturing group in the request path while (matchResultsIterator.hasNext()) { mr = matchResultsIterator.next(); segmentIndex += mr.group().length() - pathLength; pathLength = mr.group().length(); } return new int[] {segmentIndex - groupLength, segmentIndex}; } } return null; }
private int[] getPathParameterBounds(final String name) { final Iterator<UriTemplate> templatesIterator = templates.iterator(); final Iterator<MatchResult> matchResultsIterator = matchResults.iterator(); while (templatesIterator.hasNext()) { MatchResult mr = matchResultsIterator.next(); // Find the index of path parameter final int pIndex = getLastPathParameterIndex(name, templatesIterator.next()); if (pIndex != -1) { int pathLength = mr.group().length(); int segmentIndex = mr.end(pIndex + 1); final int groupLength = segmentIndex - mr.start(pIndex + 1); // Find the absolute position of the end of the // capturing group in the request path while (matchResultsIterator.hasNext()) { mr = matchResultsIterator.next(); segmentIndex += mr.group().length() - pathLength; pathLength = mr.group().length(); } return new int[] {segmentIndex - groupLength, segmentIndex}; } } return null; }
private int[] getPathParameterBounds(final String name) { final Iterator<UriTemplate> templatesIterator = templates.iterator(); final Iterator<MatchResult> matchResultsIterator = matchResults.iterator(); while (templatesIterator.hasNext()) { MatchResult mr = matchResultsIterator.next(); // Find the index of path parameter final int pIndex = getLastPathParameterIndex(name, templatesIterator.next()); if (pIndex != -1) { int pathLength = mr.group().length(); int segmentIndex = mr.end(pIndex + 1); final int groupLength = segmentIndex - mr.start(pIndex + 1); // Find the absolute position of the end of the // capturing group in the request path while (matchResultsIterator.hasNext()) { mr = matchResultsIterator.next(); segmentIndex += mr.group().length() - pathLength; pathLength = mr.group().length(); } return new int[] {segmentIndex - groupLength, segmentIndex}; } } return null; }
private int[] getPathParameterBounds(final String name) { final Iterator<UriTemplate> templatesIterator = templates.iterator(); final Iterator<MatchResult> matchResultsIterator = matchResults.iterator(); while (templatesIterator.hasNext()) { MatchResult mr = matchResultsIterator.next(); // Find the index of path parameter final int pIndex = getLastPathParameterIndex(name, templatesIterator.next()); if (pIndex != -1) { int pathLength = mr.group().length(); int segmentIndex = mr.end(pIndex + 1); final int groupLength = segmentIndex - mr.start(pIndex + 1); // Find the absolute position of the end of the // capturing group in the request path while (matchResultsIterator.hasNext()) { mr = matchResultsIterator.next(); segmentIndex += mr.group().length() - pathLength; pathLength = mr.group().length(); } return new int[] {segmentIndex - groupLength, segmentIndex}; } } return null; }
private int[] getPathParameterBounds(final String name) { final Iterator<UriTemplate> templatesIterator = templates.iterator(); final Iterator<MatchResult> matchResultsIterator = matchResults.iterator(); while (templatesIterator.hasNext()) { MatchResult mr = matchResultsIterator.next(); // Find the index of path parameter final int pIndex = getLastPathParameterIndex(name, templatesIterator.next()); if (pIndex != -1) { int pathLength = mr.group().length(); int segmentIndex = mr.end(pIndex + 1); final int groupLength = segmentIndex - mr.start(pIndex + 1); // Find the absolute position of the end of the // capturing group in the request path while (matchResultsIterator.hasNext()) { mr = matchResultsIterator.next(); segmentIndex += mr.group().length() - pathLength; pathLength = mr.group().length(); } return new int[] {segmentIndex - groupLength, segmentIndex}; } } return null; }
private int[] getPathParameterBounds(final String name) { final Iterator<UriTemplate> templatesIterator = templates.iterator(); final Iterator<MatchResult> matchResultsIterator = matchResults.iterator(); while (templatesIterator.hasNext()) { MatchResult mr = matchResultsIterator.next(); // Find the index of path parameter final int pIndex = getLastPathParameterIndex(name, templatesIterator.next()); if (pIndex != -1) { int pathLength = mr.group().length(); int segmentIndex = mr.end(pIndex + 1); final int groupLength = segmentIndex - mr.start(pIndex + 1); // Find the absolute position of the end of the // capturing group in the request path while (matchResultsIterator.hasNext()) { mr = matchResultsIterator.next(); segmentIndex += mr.group().length() - pathLength; pathLength = mr.group().length(); } return new int[] {segmentIndex - groupLength, segmentIndex}; } } return null; }