public static List<PathSegment> parsePath(String path) {
String[] segmentsArray = StringUtils.fastSplitTemplate(path, "/", true); //$NON-NLS-1$
List<PathSegment> pathSegments = new ArrayList<PathSegment>(segmentsArray.length);
// go over all the segments and add them
for (String segment : segmentsArray) {
pathSegments.add(new PathSegmentImpl(segment, null));
}
return pathSegments;
}