@ Override public final int compareTo ( CacheEntry other ) { switch ( type ) { case LFU : return compareToLFU ( other ) ; case LRU : return compareToLRU ( other ) ; case FIFO : return compareToFIFO ( other ) ; default : die ( ) ; return 0 ; } }
Comparison of entries this determines what we will order the cache by which determines which type of cache it is .