@Override
    protected void updateListAfterHit(CacheEntry<K, V> entry) {
        if (entry != null && !entry.equals(_first)) {
            if (entry.equals(_last)) {
                setLast(entry.getPrevious());
            } else {
                final CacheEntry<K, V> previous = entry.getPrevious();
                final CacheEntry<K, V> next = entry.getNext();

                previous.setNext(next);
                next.setPrevious(previous);
            }
            _first.setPrevious(entry);
            entry.setNext(_first);
            setFirst(entry);
        }
    }
@Override
    protected void updateListAfterHit(CacheEntry<K, V> entry) {
        if (entry != null && !entry.equals(_first)) {
            if (entry.equals(_last)) {
                setLast(entry.getPrevious());
            } else {
                final CacheEntry<K, V> previous = entry.getPrevious();
                final CacheEntry<K, V> next = entry.getNext();

                previous.setNext(next);
                next.setPrevious(previous);
            }
            _first.setPrevious(entry);
            entry.setNext(_first);
            setFirst(entry);
        }
    }
@ Override protected void updateListAfterHit ( CacheEntry < K , V > entry ) { if ( entry != null && ! entry . equals ( _first ) ) { if ( entry . equals ( _last ) ) { setLast ( entry . getPrevious ( ) ) ; } else { final CacheEntry < K , V > previous = entry . getPrevious ( ) ; final CacheEntry < K , V > next = entry . getNext ( ) ; previous . setNext ( next ) ; next . setPrevious ( previous ) ; } _first . setPrevious ( entry ) ; entry . setNext ( _first ) ; setFirst ( entry ) ; } }
Move the entry to the beginning of the LinkedList.
Move the entry to the beginning of the LinkedList .