001    package railo.runtime.debug;
002    
003    import java.util.Comparator;
004    
005    
006    
007    /**
008     * 
009     */
010    public final class DebugEntryComparator implements Comparator {
011    
012        /**
013         * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
014         */
015        public int compare(Object o1, Object o2) {
016            return compare((DebugEntry)o1,(DebugEntry)o2);
017        }
018        
019        private int compare(DebugEntry de1,DebugEntry de2) {
020            return (de2.getExeTime()+de2.getFileLoadTime())-(de1.getExeTime()+de1.getFileLoadTime());
021        }
022    }