class ListNode {
Container data;
ListNode next;
....
}
public class List implements Enumeration {
private ListNode firstNode;
private ListNode lastNode;
public List(){
firstNode=lastNode=null;
}
public List(ListNode ){...}
public boolean hasMoreElements(){...}
public ListNode nextElement(){...}
....
}
Container data;
ListNode next;
....
}
public class List implements Enumeration {
private ListNode firstNode;
private ListNode lastNode;
public List(){
firstNode=lastNode=null;
}
public List(ListNode ){...}
public boolean hasMoreElements(){...}
public ListNode nextElement(){...}
....
}