File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
src/main/java/tudelft/ti2806/pl3 Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -16,18 +16,38 @@ public class GraphData {
16
16
private List <Edge > edges ;
17
17
private List <Genome > genomes ;
18
18
19
+ /**
20
+ * Initiate a instance of {@code GraphData}.
21
+ *
22
+ * @param nodes
23
+ * the nodes of the graph
24
+ * @param edges
25
+ * the edges of the graph
26
+ * @param genomes
27
+ * all {@link Genome} that are in the graph
28
+ */
19
29
public GraphData (List <Node > nodes , List <Edge > edges , List <Genome > genomes ) {
20
30
this .nodes = nodes ;
21
31
this .edges = edges ;
22
32
this .genomes = genomes ;
23
33
}
24
34
35
+ /**
36
+ * Creates a clone of the edge list without cloning its elements.
37
+ *
38
+ * @return a clone of the edge list of this graph
39
+ */
25
40
public List <Edge > getEdgeListClone () {
26
41
List <Edge > clone = new ArrayList <Edge >();
27
42
clone .addAll (edges );
28
43
return clone ;
29
44
}
30
45
46
+ /**
47
+ * Creates a clone of the node list without cloning its elements.
48
+ *
49
+ * @return a clone of the node list
50
+ */
31
51
public List <Node > getNodeListClone () {
32
52
List <Node > clone = new ArrayList <Node >();
33
53
clone .addAll (nodes );
Original file line number Diff line number Diff line change @@ -264,8 +264,8 @@ protected List<Edge> findToEdges(List<Edge> edges) {
264
264
Edge lastEdge = null ;
265
265
boolean found = true ;
266
266
for (Edge edge : edges ) {
267
- if (lastEdge != null
268
- && edge . getTo (). getNodeId () == lastEdge .getTo ().getNodeId ()) {
267
+ if (lastEdge != null && edge . getTo (). getNodeId ()
268
+ == lastEdge .getTo ().getNodeId ()) {
269
269
found = true ;
270
270
} else {
271
271
if (found == false ) {
You can’t perform that action at this time.
0 commit comments