private void addToNonEmptyForward(Items list) { if (nonEmptyItemsWithID == null) nonEmptyItemsWithID = new DoublyLinkedListImpl<Items>(); Enumeration<Items> it = nonEmptyItemsWithID.elements(); while (it.hasMoreElements()) { Items compare = it.nextElement(); if (compare.timeLastSent >= list.timeLastSent) { nonEmptyItemsWithID.insertPrev(compare, list); return; } } nonEmptyItemsWithID.unshift(list); }