private static boolean isClosest(long ts, long[] timeStamps, int curIdx) {
    """
	Returns true if the timeStamp at curIdx is the one that ts is the closest
	to. We know that timeStamps[curIdx-1], if it exists, was not the
	closest.
    """
	      if (curIdx >= (timeStamps.length - 1)) {
	        // curIdx is the last one so it must be the closest
	        return true;
	      }
	      if (ts == timeStamps[curIdx]) {
	        return true;
	      }
	      return closer(ts, timeStamps[curIdx], timeStamps[curIdx + 1]);
	    }
private static boolean isClosest(long ts, long[] timeStamps, int curIdx) {
	      if (curIdx >= (timeStamps.length - 1)) {
	        // curIdx is the last one so it must be the closest
	        return true;
	      }
	      if (ts == timeStamps[curIdx]) {
	        return true;
	      }
	      return closer(ts, timeStamps[curIdx], timeStamps[curIdx + 1]);
	    }
private static boolean isClosest ( long ts , long [ ] timeStamps , int curIdx ) { if ( curIdx >= ( timeStamps . length - 1 ) ) { // curIdx is the last one so it must be the closest return true ; } if ( ts == timeStamps [ curIdx ] ) { return true ; } return closer ( ts , timeStamps [ curIdx ] , timeStamps [ curIdx + 1 ] ) ; }
Returns true if the timeStamp at curIdx is the one that ts is the closest
to. We know that timeStamps[curIdx-1], if it exists, was not the
closest.
Returns true if the timeStamp at curIdx is the one that ts is the closest to . We know that timeStamps [ curIdx - 1 ] if it exists was not the closest .