ImmutableLocalDateDoubleTimeSeries extends AbstractLocalDateDoubleTimeSeries implements LocalDateDoubleTimeSeries, Serializable { public static LocalDateDoubleTimeSeriesBuilder builder() { return new ImmutableLocalDateDoubleTimeSeriesBuilder(); } ImmutableLocalDateDoubleTimeSeries(int[] times, double[] values); static LocalDateDoubleTimeSeriesBuilder builder(); static ImmutableLocalDateDoubleTimeSeries of(LocalDate date, double value); static ImmutableLocalDateDoubleTimeSeries of(LocalDate[] dates, Double[] values); static ImmutableLocalDateDoubleTimeSeries of(LocalDate[] dates, double[] values); static ImmutableLocalDateDoubleTimeSeries of(int[] dates, double[] values); static ImmutableLocalDateDoubleTimeSeries of(Collection<LocalDate> dates, Collection<Double> values); static ImmutableLocalDateDoubleTimeSeries of(DateDoubleTimeSeries<?> timeSeries); static ImmutableLocalDateDoubleTimeSeries from(DoubleTimeSeries<LocalDate> timeSeries); @Override int size(); @Override boolean containsTime(int date); @Override Double getValue(int date); @Override int getTimeAtIndexFast(int index); @Override double getValueAtIndexFast(int index); @Override int getEarliestTimeFast(); @Override double getEarliestValueFast(); @Override int getLatestTimeFast(); @Override double getLatestValueFast(); @Override int[] timesArrayFast(); @Override double[] valuesArrayFast(); @Override LocalDateDoubleTimeSeries subSeriesFast(int startTime, boolean includeStart, int endTime, boolean includeEnd); @Override LocalDateDoubleTimeSeries head(int numItems); @Override LocalDateDoubleTimeSeries tail(int numItems); @Override ImmutableLocalDateDoubleTimeSeries newInstance(LocalDate[] dates, Double[] values); @Override LocalDateDoubleTimeSeries operate(UnaryOperator operator); @Override LocalDateDoubleTimeSeries operate(double other, BinaryOperator operator); @Override LocalDateDoubleTimeSeriesBuilder toBuilder(); LocalDateDoubleTimeSeries withValues(double[] values); static final ImmutableLocalDateDoubleTimeSeries EMPTY_SERIES; }
@Test(expectedExceptions = IllegalArgumentException.class) public void test_builder_putAll_int_mismatchedArrays() { LocalDateDoubleTimeSeriesBuilder bld = ImmutableLocalDateDoubleTimeSeries.builder(); int[] inDates = new int[] {20120630, 20120701}; double[] inValues = new double[] {2.0, 3.0, 1.0}; bld.putAll(inDates, inValues); }