-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFLList.java
More file actions
55 lines (42 loc) · 1.08 KB
/
FLList.java
File metadata and controls
55 lines (42 loc) · 1.08 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
public class FLList {
public FLListNode root;
public FLListNode tail;
public FLIntNode ocgRoot;
public FLIntNode tcgRoot;
public FLIntNode ocgTail;
public FLIntNode tcgTail;
public FLList () {};
public FLList (String inId) {
insert(inId);
}
public void insert (String inId) {
if (root == null) {
root = new FLListNode(inId);
tail = root;
}
else {
tail.next = new FLListNode(inId);
tail = tail.next;
}
}
public void insertTcg (int inValue) {
if (tcgRoot == null) {
tcgRoot = new FLIntNode(inValue);
tcgTail = tcgRoot;
}
else {
tcgTail.next = new FLIntNode(inValue);
tcgTail = tcgTail.next;
}
}
public void insertOcg (int inValue) {
if (ocgRoot == null) {
ocgRoot = new FLIntNode(inValue);
ocgTail = ocgRoot;
}
else {
ocgTail.next = new FLIntNode(inValue);
ocgTail = ocgTail.next;
}
}
}