final String startData = (String) path.get("start");
final String endData = (String) path.get("end");
final Integer length = (Integer) path.get("length");
RestRelationship lastRelationship = lastRelationshipData == null ? null : new RestRelationship(lastRelationshipData, restApi);
return new SimplePath(
new RestNode(startData,restApi),
new RestNode(endData,restApi),
lastRelationship,
length,
new IterableWrapper<Node, String>(nodesData) {
@Override
protected Node underlyingObjectToObject(String data) {
return new RestNode(data,restApi);
}
},
new IterableWrapper<Relationship, String>(relationshipsData) {
@Override
protected Relationship underlyingObjectToObject(String data) {