Skip to content

Commit 9d5c89b

Browse files
committed
Javadoc & checkstyle fix
1 parent 29d0533 commit 9d5c89b

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

src/main/java/tudelft/ti2806/pl3/data/graph/GraphData.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,38 @@ public class GraphData {
1616
private List<Edge> edges;
1717
private List<Genome> genomes;
1818

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+
*/
1929
public GraphData(List<Node> nodes, List<Edge> edges, List<Genome> genomes) {
2030
this.nodes = nodes;
2131
this.edges = edges;
2232
this.genomes = genomes;
2333
}
2434

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+
*/
2540
public List<Edge> getEdgeListClone() {
2641
List<Edge> clone = new ArrayList<Edge>();
2742
clone.addAll(edges);
2843
return clone;
2944
}
3045

46+
/**
47+
* Creates a clone of the node list without cloning its elements.
48+
*
49+
* @return a clone of the node list
50+
*/
3151
public List<Node> getNodeListClone() {
3252
List<Node> clone = new ArrayList<Node>();
3353
clone.addAll(nodes);

src/main/java/tudelft/ti2806/pl3/visualization/GraphModel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ protected List<Edge> findToEdges(List<Edge> edges) {
264264
Edge lastEdge = null;
265265
boolean found = true;
266266
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()) {
269269
found = true;
270270
} else {
271271
if (found == false) {

0 commit comments

Comments
 (0)