Vector result = new Vector();
Node previous = null;
Node node;
//iterate through the path object getting each node and it's neighbour and build edge objects from them
for (Iterator iterator = path.riterator(); iterator.hasNext();) {
node = (Node) iterator.next();
if (previous != null) {
// Adds the resulting edge into the vector
result.add(node.getEdge(previous));
}