code: private double fillInterpolatedValues(InterpolationType interpolationType) {
  		double interpolatedValue = 0;
  		if (shouldDoInterpolation(true)) {
  
  			double y1 = values[indexToInterpolate];
  
  			if (current == indexToInterpolate) {
  				return y1;
  			}
  
  			long x = timestamps[current];
  			long x1 = timestamps[indexToInterpolate];
  			if (x == x1) {
  				return y1;
  			}
  			int next = indexToInterpolate + iterators.length;
  			double y2 = values[next];
  			long x2 = timestamps[next];
  			if (x == x2) {
  				return y2;
  			}
  
  			switch(interpolationType){
  			case LININT:
  				interpolatedValue = (y2 - y1) / (x2 - x1) * (x - x1) + y1;
  				break;
  			case ZIMSUM:
  				interpolatedValue = 0;
  				break;
  			default:
  				throw new IllegalArgumentException("Invalid interpolation type specified");
  			}
  		}
  		return interpolatedValue;
  	}
docs: /*
  Fills interpolated value for a missing timestamp.
  If there is already a value for a given timestamp, then don't do any operation.