private static List<PathSegment> convertPathSegmentList(final List<String> pathSegments) {
ArrayList<PathSegment> converted = new ArrayList<PathSegment>();
for (final String segment : pathSegments) {
int index = segment.indexOf(";");
if (index == -1) {
converted.add(new ODataPathSegmentImpl(Decoder.decode(segment), null));
} else {
String path = segment.substring(0, index);
Map<String, List<String>> parameterMap = extractMatrixParameter(segment, index);
converted.add(new ODataPathSegmentImpl(Decoder.decode(path), parameterMap));
}
}
return converted;
}