public void touch(final LruMapNode e) {
        final LruMapNode n = e.next;
        final LruMapNode p = e.previous;

        if (n == null) {
            return; // already at mru
        }
        n.previous = p;
        if (p != null) {
            p.next = n;
        } else {
            lru = n;
        }

        mru.next = e;
        e.previous = mru;
        e.next = null;
        mru = e;
    }
Something like LinkedHashMap, but purpose build, less dynamic and memory efficient

@author ab
main/src/main/java/cgeo/geocaching/brouter/util/LruMap.java