public Iterable < Entry < String , ProfileNode > > getDescendingOrderedNodes ( ) { if ( nodes == null ) return null ; List < Entry < String , ProfileNode > > averageStepTimes = new LinkedList < Entry < String , ProfileNode > > ( nodes . entrySet ( ) ) ; Collections . sort ( averageStepTimes , new Comparator < Entry < String , ProfileNode > > ( ) { public int compare ( Entry < String , ProfileNode > o1 , Entry < String , ProfileNode > o2 ) { return ( int ) ( o1 . getValue ( ) . totalMillisecs - o2 . getValue ( ) . totalMillisecs ) ; } } ) ; return averageStepTimes ; }
Returns a sorted enumerable of the nodes in descending order of how long they took to run .