/** * Returns the path as a list of segments. */ public String[] getPathSegments() { ArrayList<String> list = new ArrayList<String>(); fillPathSegments(list); return list.toArray(new String[list.size()]); }
/** * Returns the path as a list of segments. */ public String[] getPathSegments() { ArrayList<String> list = new ArrayList<String>(); fillPathSegments(list); return list.toArray(new String[list.size()]); }
/** * Recursively fills the segment list with the full path. * @param list The list of segments to fill. */ protected void fillPathSegments(ArrayList<String> list) { if (isRoot) { return; } if (parent != null) { parent.fillPathSegments(list); } list.add(name); }
/** * Recursively fills the segment list with the full path. * @param list The list of segments to fill. */ protected void fillPathSegments(ArrayList<String> list) { if (isRoot) { return; } if (parent != null) { parent.fillPathSegments(list); } list.add(name); }