1: // @author Frank M. Carrano, Timothy M. Henry 2: // @version 5.0 3: public T dequeue() 4: { 5: T front = getFront(); // Might throw EmptyQueueException 6: // Assertion: firstNode != null 7: firstNode.setData(null); 8: firstNode = firstNode.getNextNode(); 10: if (firstNode == null) 11: lastNode = null; 13: return front; 14: } // end dequeue