class CacheEntryList {

    public void addItem(ITEM item)
    {
        assert item != null;
        assert !item.placeholder();
        observer.adding(item);
        item.recentAccess(true);
        // In a non-empty list, the new item goes behind clockHand. Since it's newest, it's probably
        // best to consider it for eviction last.
        switch (size) {
            case 0:
                assert clockHand == null;
                assert previous == null;
                clockHand = item;
                item.next(clockHand);
                break;
            case 1:
                assert clockHand != null;
                assert previous == null;
                clockHand.next(item);
                item.next(clockHand);
                previous = item;
                break;
            default:
                assert clockHand != null;
                assert previous != null;
                item.next(clockHand);
                previous.next(item);
                previous = item;
                break;
        }
        size++;
    }

    public  CacheEntryList(Observer<ID, ITEM> observer);

}