-
Notifications
You must be signed in to change notification settings - Fork 271
Expand file tree
/
Copy pathCreateLineRequest.java
More file actions
44 lines (31 loc) · 880 Bytes
/
CreateLineRequest.java
File metadata and controls
44 lines (31 loc) · 880 Bytes
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
package nextstep.subway.line;
class CreateLineRequest {
private String name;
private String color;
private long upStationId;
private long downStationId;
private long distance;
public CreateLineRequest(String name, String color, long upStationId, long downStationId, long distance) {
this.name = name;
this.color = color;
this.upStationId = upStationId;
this.downStationId = downStationId;
this.distance = distance;
}
public String getName() {
return name;
}
public String getColor() { return color; }
public long getUpStationId() {
return upStationId;
}
public long getDownStationId() {
return downStationId;
}
public long getDistance() {
return distance;
}
public Line toLine() {
return new Line(name, color);
}
}