protected List < AcademicTermDetail > getAcademicTermsAfter ( DateTime start ) { final List < AcademicTermDetail > terms = this . eventAggregationManagementDao . getAcademicTermDetails ( ) ; final int index = Collections . binarySearch ( terms , new AcademicTermDetailImpl ( start . toDateMidnight ( ) , start . plusDays ( 1 ) . toDateMidnight ( ) , "" ) ) ; if ( index > 0 ) { return terms . subList ( index , terms . size ( ) ) ; } else if ( index < 0 ) { return terms . subList ( - ( index + 1 ) , terms . size ( ) ) ; } return terms ; }
Return a sorted list of AcademicTermDetail objects where the the first element of the list where the first element is the first term that starts after the specified start DateTime .