question: public static int lowerBound ( final List < Date > dates , final Date value ) { int len = dates . size ( ) ; int from = 0 ; int half ; int middle ; while ( len > 0 ) { half = len > > 1 ; middle = from ; middle = middle + half ; if ( value . compareTo ( dates . get ( middle ) ) == 1 ) { from = middle ; from ++ ; len = len - half - 1 ; } else { len = half ; } } return from ; }
target:  This method is equivalent to std:lower_bound function Returns an index pointing to the first element in the ordered collection is equal or greater than passed value