private static int getDailyRecIndex ( ArrayList < Map > dailyData , String findDate , int start , int expectedDiff ) { String date ; if ( start + expectedDiff < dailyData . size ( ) ) { date = getValueOr ( dailyData . get ( start + expectedDiff ) , "w_date" , "" ) ; if ( isSameDate ( date , findDate , "-" ) ) { return start + expectedDiff ; } else { expectedDiff ++ ; date = getValueOr ( dailyData . get ( start + expectedDiff ) , "w_date" , "" ) ; if ( isSameDate ( date , findDate , "-" ) ) { return start + expectedDiff ; } } } for ( int j = start ; j < dailyData . size ( ) ; j ++ ) { date = getValueOr ( dailyData . get ( j ) , "w_date" , "" ) ; if ( isSameDate ( date , findDate , "-" ) ) { return j ; } } return dailyData . size ( ) ; }
Find the index of daily data array for the particular date