-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNode.java
More file actions
54 lines (44 loc) · 1.1 KB
/
Node.java
File metadata and controls
54 lines (44 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package Individual_Project;
import java.util.*;
/**
* A class representing a node using its longitude x,its latitude y and the path_movt it belongs to.
*/
public class Node extends Point {
private Path_movt path_movt;
/**
* A list that contains all the nodes in the map.
*/
static ArrayList<Node> nodes = new ArrayList<Node>();
/**
* @param x longitude
* @param y latitude
* @param Path_movt path_movt
*/
public Node(double x, double y, Path_movt path_movt) {
super(x, y);
this.path_movt = path_movt;
}
/**
* @return the Path_movt
*/
public Path_movt getPath_movt() {
return path_movt;
}
/**
* @param path_movt the path_movt to set
*/
public void setPath_movt(Path_movt path_movt) {
this.path_movt = path_movt;
}
@Override
/**
*
* To string
*
* @return String
*/
public String toString() {
// txtWriter.name_id(path_movt.getPath_movtName());
return "Node with path_movtId = " + path_movt.getPath_movtId() + " path_movtName = " + path_movt.getPath_movtName() + " x = " + getX() + ", y = " + getY();
}
}