-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathBridge.java
More file actions
33 lines (24 loc) · 854 Bytes
/
Bridge.java
File metadata and controls
33 lines (24 loc) · 854 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
package domain.ladder;
public class Bridge {
private Integer location;
private LinkedType linkPillarDirection;
private Bridge(Integer location, LinkedType linkPillarDirection) {
this.location = location;
this.linkPillarDirection = linkPillarDirection;
}
public static Bridge of(Integer location , LinkedType linkPillarDirection){
return new Bridge(location, linkPillarDirection);
}
public Integer getLocation() {
return location;
}
public LinkedType getLinkPillarDirection() {
return linkPillarDirection;
}
public static Bridge createOneRightBridge(Integer location) {
return (new Bridge(location, LinkedType.RIGHT));
}
public static Bridge createOneLeftBridge(Integer location) {
return (new Bridge(location, LinkedType.LEFT));
}
}