class SparseLocalDateDoubleTimeSeries implements ImmutableBean, Serializable, LocalDateDoubleTimeSeries {

  static SparseLocalDateDoubleTimeSeries of(Collection<LocalDate> dates, Collection<Double> values) {
    ArgChecker.noNulls(dates, "dates");
    ArgChecker.noNulls(values, "values");
    LocalDate[] datesArray = dates.toArray(new LocalDate[dates.size()]);
    double[] valuesArray = Doubles.toArray(values);
    validate(datesArray, valuesArray);
    return createUnsafe(datesArray, valuesArray);
  }

  @ImmutableConstructor private  SparseLocalDateDoubleTimeSeries(LocalDate[] dates, double[] values);
  private  SparseLocalDateDoubleTimeSeries(LocalDate[] dates, double[] values, boolean trusted);

}