Skip to content

Commit

Permalink
Increase code coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas ADAM <[email protected]>
  • Loading branch information
tadam50 committed Dec 12, 2023
1 parent fdc4176 commit 5d7fa36
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/
package com.powsybl.sld.layout.pathfinding;

import java.io.*;
import java.util.*;

/**
Expand All @@ -16,7 +15,7 @@
public class Grid {

static class Node {
private Point point;
private final Point point;
private int cost;
private int distance;
private Node parent;
Expand All @@ -29,9 +28,7 @@ public Node(Point p, int cost, int distance) {
}

public Node(int x, int y, int cost, int distance) {
this.point = new Point(x, y);
this.cost = cost;
this.distance = distance;
this(new Point(x, y), cost, distance);
}

public Point getPoint() {
Expand All @@ -50,21 +47,6 @@ public Node getParent() {
return parent;
}

public Node setCost(int cost) {
this.cost = cost;
return this;
}

public Node setDistance(int distance) {
this.distance = distance;
return this;
}

public Node setParent(Node parent) {
this.parent = parent;
return this;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand Down Expand Up @@ -103,14 +85,6 @@ public Grid(int width, int height) {
}
}

public int getHeight() {
return height;
}

public int getWidth() {
return width;
}

public void updateNode(Point point, int cost, int distance, Node parent) {
Node node = getNode(point);
node.cost = cost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ public int y() {
return y;
}

public Point setX(int x) {
this.x = x;
return this;
}

public Point setY(int y) {
this.y = y;
return this;
}

public int manhattanDistance(Point other) {
return Math.abs(this.x - other.x) + Math.abs(this.y - other.y);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,4 @@
* @author Thomas Adam <tadam at neverhack.com>
*/
public record MatrixCell(BaseGraph graph, int col, int row) {

public String getId() {
return graph.getId();
}
}

0 comments on commit 5d7fa36

Please sign in to comment.