class DenseLocalDateDoubleTimeSeries implements ImmutableBean, LocalDateDoubleTimeSeries, Serializable {

  @Override
  public LocalDateDoubleTimeSeries headSeries(int numPoints) {
    ArgChecker.notNegative(numPoints, "numPoints");

    if (numPoints == 0) {
      return LocalDateDoubleTimeSeries.empty();
    } else if (numPoints > size()) {
      return this;
    }
    int endPosition = findHeadPoints(numPoints);
    return new DenseLocalDateDoubleTimeSeries(startDate, Arrays.copyOf(points, endPosition), dateCalculation);
  }

  private  DenseLocalDateDoubleTimeSeries(
      LocalDate startDate,
      double[] points,
      DenseTimeSeriesCalculation dateCalculation,
      boolean trusted,
      int size);
  @ImmutableConstructor private  DenseLocalDateDoubleTimeSeries(
      LocalDate startDate,
      double[] points,
      DenseTimeSeriesCalculation dateCalculation);

}