-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPieceNode.java
45 lines (37 loc) · 854 Bytes
/
PieceNode.java
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
public class PieceNode implements Node<PieceNode> {
private int start, length;
boolean origin;
private PieceNode next, prev;
public PieceNode(int start, int length, boolean origin) {
this.start = start;
this.length = length;
this.next = null;
this.prev = null;
this.origin = origin;
}
public int getStart() {
return start;
}
public int getLength() {
return length;
}
public boolean isOrigin() {
return origin;
}
@Override
public PieceNode getNext() {
return next;
}
@Override
public void setNext(PieceNode next) {
this.next = next;
}
@Override
public PieceNode getPrev() {
return prev;
}
@Override
public void setPrev(PieceNode prev) {
this.prev = prev;
}
}