private final int compareTime ( CacheEntry other ) { if ( time > other . time ) { //this time stamp is greater so it has higher priority return 1 ; } else if ( time < other . time ) { //this time stamp is lower so it has lower priority return - 1 ; } else if ( time == other . time ) { //equal priority return 0 ; } die ( ) ; return 0 ; }
Compare the time .