// Textbook fragment 06.20 /** Inner class storing elements and their access counts. */ protected static class Entry { private E value; // element private int count; // access count /** Constructor */ Entry(E v) { count = 1; value = v; } /** Returns the element */ public E value() { return value; } /** Returns the access count */ public int count() { return count; } /** Increments the access count */ public int incrementCount() { return ++count; } /** String representation of the entry as [count,value] */ public String toString() { return "[" + count + "," + value + "]"; } } } // End of FavoriteList class