Esempio n. 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
 }
Esempio n. 2
0
 public void remove() {
   currentNode = currentNode.getNext();
 }
Esempio n. 3
0
  public E next() {
    E data = (E) currentNode.getData();
    currentNode = currentNode.getNext();

    return data;
  }