Remove unneeded setters in Box.java

Remove compareTo in Box.java and VertexInterface
This commit is contained in:
antograb committed 2017-12-10 17:21:26 +01:00
1 parent d46b3c3b99
commit d836c2c9f0
2 files changed
+1 -34

No files matched your search

+1 -3
View File
@@ -2,8 +2,6 @@ package dijkstra;
public interface VertexInterface {
/** Compare a Vertex to another */
public boolean compareTo(VertexInterface vertex) ;
public String getLabel() ;
}
-31
View File
@@ -26,13 +26,6 @@ public abstract class Box
}
public boolean compareTo(VertexInterface vertex) {
if (this.getLabel() == vertex.getLabel()) {
return true ;
}
return false ;
}
public boolean isWalkable() {
return true ;
}
@@ -49,42 +42,18 @@ public abstract class Box
return neighbourList;
}
public void setNeighbourList(ArrayList<Box> neighbourList) {
this.neighbourList = neighbourList;
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public int getY() {
return y;
}
public void setY(int y) {
this.y = y;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public Maze getMaze() {
return maze;
}
public void setMaze(Maze maze) {
this.maze = maze;
}
public String toString() {
return "Label: " + label + ", x: " + x + ", y: " + y;
}