예제 #1
0
 public boolean hasNext() {
   boolean val = true;
   if (currentNode.getNext() == null) {
     val = false;
   }
   return val;
   // if we have no dummy node, return currentNode == null
 }
예제 #2
0
 public void remove() {
   currentNode = currentNode.getNext();
 }
예제 #3
0
  public E next() {
    E data = (E) currentNode.getData();
    currentNode = currentNode.getNext();

    return data;
  }