drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/client/URLTool.java
public static Vector getElements(URL url) {
        Vector result = new Vector(5);
        String lastElement = null;
        while ((lastElement = getLastElement(url)) != null) {
            result.insertElementAt(lastElement, 0);
            url = getParent(url);
        }
        return result;
    }
public static Vector getElements(URL url) {
        Vector result = new Vector(5);
        String lastElement = null;
        while ((lastElement = getLastElement(url)) != null) {
            result.insertElementAt(lastElement, 0);
            url = getParent(url);
        }
        return result;
    }
public static Vector getElements ( URL url ) { Vector result = new Vector ( 5 ) ; String lastElement = null ; while ( ( lastElement = getLastElement ( url ) ) != null ) { result . insertElementAt ( lastElement , 0 ) ; url = getParent ( url ) ; } return result ; }
Returns all elements in the given URLs path.
<table>
<caption>Example</caption>
<tr>
<th>Given URL</th>
<th>Element</th>
<tr>
<td>"http://hostname/"</td>
<td>[]</td>
<tr>
<td>"http://hostname/folder/</td>
<td>[folder]</td>
<tr>
<td>"http://hostname/folder/file</td>
<td>[folder, file]</td>
</table>
@param url a URL
@return    all elements in the given URLs path
Returns all elements in the given URLs path . <table > <caption > Example< / caption > <tr > <th > Given URL< / th > <th > Element< / th > <tr > <td > http : // hostname / < / td > <td > [] < / td > <tr > <td > http : // hostname / folder / < / td > <td > [ folder ] < / td > <tr > <td > http : // hostname / folder / file< / td > <td > [ folder file ] < / td > < / table >