-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOSMNode.java
More file actions
69 lines (47 loc) · 1.18 KB
/
Copy pathOSMNode.java
File metadata and controls
69 lines (47 loc) · 1.18 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
public class OSMNode{
//Add the fields of this class here
private long id;
private double lon;
private String layer;
public OSMNode(long _id) {
//Constructor
id = _id;
}
public OSMNode(double value, long _id, String par3) {
//Constructor
lon = value;
id = _id;
layer = par3;
}
public double getLon() {
return lon;
}
public long getId() {
return id;
}
public void setNumRoads(int nr) {
//***This method is optional***
//Sets number of roads passing from that node
}
public void setValue(double nlon) {
//This method sets new value to value field
lon = nlon;
}
public int getNumRoads() {
//***This method is optional***
//This method returns num nodes paased from that node
return 0;
}
void addRoad(OSMRoad r) {
//***This method is optional***
//This method adds road r to the list of roads passing from this node
}
public boolean equals(OSMNode n) {
//Checks if this node is equal to node n
return n.getId() == this.id;
}
public void setLon(double d) {
// TODO Auto-generated method stub
this.lon = d;
}
}