-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIntersection.java
More file actions
46 lines (37 loc) · 1.03 KB
/
Intersection.java
File metadata and controls
46 lines (37 loc) · 1.03 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
import java.util.ArrayList;
public class Intersection {
private int Id;
private ArrayList<Street> inStreets;
private ArrayList<Street> outStreets;
public Intersection(int id) {
Id = id;
this.inStreets = new ArrayList<>();
this.outStreets = new ArrayList<>();
}
public int getId() {
return Id;
}
public void setId(int id) {
Id = id;
}
public ArrayList<Street> getInStreets() {
return inStreets;
}
public void setInStreets(ArrayList<Street> inStreets) {
this.inStreets = inStreets;
}
public ArrayList<Street> getOutStreets() {
return outStreets;
}
public void setOutStreets(ArrayList<Street> outStreets) {
this.outStreets = outStreets;
}
@Override
public String toString() {
return "Intersection{" +
"Id=" + Id +
", inStreets=" + inStreets +
", outStreets=" + outStreets +
'}';
}
}