-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPListNode.java
More file actions
45 lines (34 loc) · 793 Bytes
/
PListNode.java
File metadata and controls
45 lines (34 loc) · 793 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
45
//PList is a doubly linked list modified to suit our purposes
//package dict;
import java.io.Serializable;
public class PListNode implements Serializable{
protected PListNode prev;
protected PListNode next;
protected Object item;
private static final long serialVersionUID = 5L;
public PListNode(){
item = null;
prev = null;
next = null;
}
public PListNode(Object entry, PListNode previous, PListNode nxt){
item = entry;
prev = previous;
next = nxt;
}
public PListNode(Object entry){
this(entry, null, null);
}
public PListNode prev(){
return prev;
}
public PListNode next(){
return next;
}
public Object item(){
return item;
}
public boolean isValidNode(){
return item != null;
}
}