Skip to content

Commit 140475b

Browse files
author
a-brandt
committed
chnaged ShortestPathEntity for ArangoDB 2.6
1 parent 4fdd1fc commit 140475b

File tree

1 file changed

+19
-29
lines changed

1 file changed

+19
-29
lines changed

src/main/java/com/arangodb/entity/ShortestPathEntity.java

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,38 +22,28 @@
2222

2323
import java.util.List;
2424

25+
import com.arangodb.entity.marker.VertexEntity;
26+
2527
/**
2628
* @author a-brandt
2729
*/
2830
public class ShortestPathEntity<V, E> extends BaseEntity {
2931

30-
/**
31-
* End vertex handle.
32-
*/
33-
private String vertex;
34-
3532
/**
3633
* path distance
3734
*/
3835
private Long distance;
3936

4037
/**
41-
* start vertex handle
38+
* List of edges of the shortest path.
4239
*/
43-
private String startVertex;
40+
private List<EdgeEntity<E>> edges;
4441

4542
/**
46-
* List of paths.
43+
* List of vertices of the shortest path. (first vertex is the start vertex
44+
* and the last vertex is the end vertex)
4745
*/
48-
private List<PathEntity<V, E>> paths;
49-
50-
public String getVertex() {
51-
return vertex;
52-
}
53-
54-
public void setVertex(String vertex) {
55-
this.vertex = vertex;
56-
}
46+
private List<VertexEntity<V>> vertices;
5747

5848
/**
5949
* Retuns the distance
@@ -69,29 +59,29 @@ public void setDistance(Long distance) {
6959
}
7060

7161
/**
72-
* Returns the document handle of the start vertex
62+
* Returns the list of edges of the shortest path.
7363
*
74-
* @return the document handle of the start vertex
64+
* @return the list of edges of the shortest path.
7565
*/
76-
public String getStartVertex() {
77-
return startVertex;
66+
public List<EdgeEntity<E>> getEdges() {
67+
return edges;
7868
}
7969

80-
public void setStartVertex(String startVertex) {
81-
this.startVertex = startVertex;
70+
public void setEdges(List<EdgeEntity<E>> edges) {
71+
this.edges = edges;
8272
}
8373

8474
/**
85-
* Returns the path list
75+
* Returns the list of vertices of the shortest path.
8676
*
87-
* @return list of PathEntity objects
77+
* @return the list of vertices of the shortest path.
8878
*/
89-
public List<PathEntity<V, E>> getPaths() {
90-
return paths;
79+
public List<VertexEntity<V>> getVertices() {
80+
return vertices;
9181
}
9282

93-
public void setPaths(List<PathEntity<V, E>> paths) {
94-
this.paths = paths;
83+
public void setVertices(List<VertexEntity<V>> vertices) {
84+
this.vertices = vertices;
9585
}
9686

9787
}

0 commit comments

Comments
 (0)