code: private List<Metric> _fillLine(List<String> constants, long relativeTo) {
          SystemAssert.requireArgument(constants != null && constants.size() == 5,
              "Line Filling Transform needs 5 constants (start, end, interval, offset, value)!");
  
          long startTimestamp = _parseStartAndEndTimestamps(constants.get(0), relativeTo);
          long endTimestamp = _parseStartAndEndTimestamps(constants.get(1), relativeTo);
          long windowSizeInSeconds = _parseTimeIntervalInSeconds(constants.get(2));
          long offsetInSeconds = _parseTimeIntervalInSeconds(constants.get(3));
          double value = Double.parseDouble(constants.get(4));
  
          SystemAssert.requireArgument(startTimestamp < endTimestamp, "End time must occure later than start time!");
          SystemAssert.requireArgument(windowSizeInSeconds >= 0, "Window size must be greater than ZERO!");
  
          // snapping start and end time
          long startSnapping = startTimestamp % (windowSizeInSeconds * 1000);
          startTimestamp = startTimestamp - startSnapping;
          long endSnapping = endTimestamp % (windowSizeInSeconds * 1000);
          endTimestamp = endTimestamp - endSnapping;
  
          Metric metric = new Metric(DEFAULT_SCOPE_NAME, DEFAULT_METRIC_NAME);
          Map<Long, Double> filledDatapoints = new TreeMap<>();
          int numDatapoints = 0;
          
          while (startTimestamp < endTimestamp && numDatapoints++ < MAX_DATAPOINTS_FOR_FILL) {
              filledDatapoints.put(startTimestamp, value);
              startTimestamp += windowSizeInSeconds * 1000;
          }
          filledDatapoints.put(endTimestamp, value);
  
          Map<Long, Double> newFilledDatapoints = new TreeMap<>();
  
          for (Map.Entry<Long, Double> entry : filledDatapoints.entrySet()) {
              newFilledDatapoints.put(entry.getKey() + offsetInSeconds * 1000, entry.getValue());
          }
          metric.setDatapoints(newFilledDatapoints);
  
          List<Metric> lineMetrics = new ArrayList<Metric>();
  
          lineMetrics.add(metric);
          return lineMetrics;
      }
docs: ~ Methods **************************************************************************************************************************************