@Override public List<PathSegment> getPathSegments() { return getPathSegments(true); }
@Override public List<PathSegment> getPathSegments() { return getPathSegments(true); }
@Override public List<PathSegment> getPathSegments(final String name) { return getPathSegments(name, true); }
@Override public List<PathSegment> getPathSegments(final String name) { return getPathSegments(name, true); }
@Override public List<PathSegment> getPathSegments(final String name, final boolean decode) { final int[] bounds = getPathParameterBounds(name); if (bounds != null) { final String path = matchResults.getLast().group(); // Work out how many path segments are up to the start // and end position of the matching path parameter value // This assumes that the path always starts with a '/' int segmentsStart = 0; for (int x = 0; x < bounds[0]; x++) { if (path.charAt(x) == '/') { segmentsStart++; } } int segmentsEnd = segmentsStart; for (int x = bounds[0]; x < bounds[1]; x++) { if (path.charAt(x) == '/') { segmentsEnd++; } } return getPathSegments(decode).subList(segmentsStart - 1, segmentsEnd); } else { return Collections.emptyList(); } }
@Override public List<PathSegment> getPathSegments(final String name, final boolean decode) { final int[] bounds = getPathParameterBounds(name); if (bounds != null) { final String path = matchResults.getLast().group(); // Work out how many path segments are up to the start // and end position of the matching path parameter value // This assumes that the path always starts with a '/' int segmentsStart = 0; for (int x = 0; x < bounds[0]; x++) { if (path.charAt(x) == '/') { segmentsStart++; } } int segmentsEnd = segmentsStart; for (int x = bounds[0]; x < bounds[1]; x++) { if (path.charAt(x) == '/') { segmentsEnd++; } } return getPathSegments(decode).subList(segmentsStart - 1, segmentsEnd); } else { return Collections.emptyList(); } }
@Override public List<PathSegment> getPathSegments() { return getPathSegments(true); }
@Override public List<PathSegment> getPathSegments(final String name) { return getPathSegments(name, true); }
@Override public List<PathSegment> getPathSegments(final String name, final boolean decode) { final int[] bounds = getPathParameterBounds(name); if (bounds != null) { final String path = matchResults.getLast().group(); // Work out how many path segments are up to the start // and end position of the matching path parameter value // This assumes that the path always starts with a '/' int segmentsStart = 0; for (int x = 0; x < bounds[0]; x++) { if (path.charAt(x) == '/') { segmentsStart++; } } int segmentsEnd = segmentsStart; for (int x = bounds[0]; x < bounds[1]; x++) { if (path.charAt(x) == '/') { segmentsEnd++; } } return getPathSegments(decode).subList(segmentsStart - 1, segmentsEnd); } else { return Collections.emptyList(); } }
@Override public List<PathSegment> getPathSegments() { return getPathSegments(true); }
@Override public List<PathSegment> getPathSegments() { return getPathSegments(true); }
@Override public List<PathSegment> getPathSegments() { return getPathSegments(true); }
@Override public List<PathSegment> getPathSegments(final String name) { return getPathSegments(name, true); }
@Override public List<PathSegment> getPathSegments(final String name) { return getPathSegments(name, true); }
@Override public List<PathSegment> getPathSegments() { return getPathSegments(true); }
@Override public List<PathSegment> getPathSegments(final String name) { return getPathSegments(name, true); }
@Override public List<PathSegment> getPathSegments(final String name) { return getPathSegments(name, true); }
@Override public List<PathSegment> getPathSegments(final String name, final boolean decode) { final int[] bounds = getPathParameterBounds(name); if (bounds != null) { final String path = matchResults.getLast().group(); // Work out how many path segments are up to the start // and end position of the matching path parameter value // This assumes that the path always starts with a '/' int segmentsStart = 0; for (int x = 0; x < bounds[0]; x++) { if (path.charAt(x) == '/') { segmentsStart++; } } int segmentsEnd = segmentsStart; for (int x = bounds[0]; x < bounds[1]; x++) { if (path.charAt(x) == '/') { segmentsEnd++; } } return getPathSegments(decode).subList(segmentsStart - 1, segmentsEnd); } else { return Collections.emptyList(); } }
@Override public List<PathSegment> getPathSegments(final String name, final boolean decode) { final int[] bounds = getPathParameterBounds(name); if (bounds != null) { final String path = matchResults.getLast().group(); // Work out how many path segments are up to the start // and end position of the matching path parameter value // This assumes that the path always starts with a '/' int segmentsStart = 0; for (int x = 0; x < bounds[0]; x++) { if (path.charAt(x) == '/') { segmentsStart++; } } int segmentsEnd = segmentsStart; for (int x = bounds[0]; x < bounds[1]; x++) { if (path.charAt(x) == '/') { segmentsEnd++; } } return getPathSegments(decode).subList(segmentsStart - 1, segmentsEnd); } else { return Collections.emptyList(); } }
@Override public List<PathSegment> getPathSegments(final String name, final boolean decode) { final int[] bounds = getPathParameterBounds(name); if (bounds != null) { final String path = matchResults.getLast().group(); // Work out how many path segments are up to the start // and end position of the matching path parameter value // This assumes that the path always starts with a '/' int segmentsStart = 0; for (int x = 0; x < bounds[0]; x++) { if (path.charAt(x) == '/') { segmentsStart++; } } int segmentsEnd = segmentsStart; for (int x = bounds[0]; x < bounds[1]; x++) { if (path.charAt(x) == '/') { segmentsEnd++; } } return getPathSegments(decode).subList(segmentsStart - 1, segmentsEnd); } else { return Collections.emptyList(); } }