/** * Returns the next ItemToShip that needs to be processed. Removes the item from the ShipmentQueue * and adds it to the ShipmentProcessStation. * * @return ItemToShip item to be processed next. */ public ItemToShip processNext() { if (queueFromFactory == null) { throw new NoSuchElementException(); } ItemToShip item = queueFromFactory.remove(); item.getInLine(station); return item; }