ImmutableLocalDateObjectTimeSeries extends AbstractDateObjectTimeSeries<LocalDate, V> implements LocalDateObjectTimeSeries<V>, Serializable { public static <V> ImmutableLocalDateObjectTimeSeries<V> of(LocalDate date, V value) { Objects.requireNonNull(date, "date"); int[] timesArray = new int[] {LocalDateToIntConverter.convertToInt(date)}; @SuppressWarnings("unchecked") V[] valuesArray = (V[]) new Object[] {value}; return new ImmutableLocalDateObjectTimeSeries<V>(timesArray, valuesArray); } ImmutableLocalDateObjectTimeSeries(int[] times, V[] values); static LocalDateObjectTimeSeriesBuilder<V> builder(); @SuppressWarnings("unchecked") static ImmutableLocalDateObjectTimeSeries<V> ofEmpty(); static ImmutableLocalDateObjectTimeSeries<V> of(LocalDate date, V value); static ImmutableLocalDateObjectTimeSeries<V> of(LocalDate[] dates, V[] values); static ImmutableLocalDateObjectTimeSeries<V> of(int[] dates, V[] values); static ImmutableLocalDateObjectTimeSeries<V> of(Collection<LocalDate> dates, Collection<V> values); @SuppressWarnings("unchecked") static ImmutableLocalDateObjectTimeSeries<V> of(DateObjectTimeSeries<?, V> timeSeries); static ImmutableLocalDateObjectTimeSeries<V> from(ObjectTimeSeries<LocalDate, V> timeSeries); @Override int size(); @Override boolean containsTime(int date); @Override V getValue(int date); @Override int getTimeAtIndexFast(int index); @Override V getValueAtIndex(int index); @Override int getEarliestTimeFast(); @Override V getEarliestValue(); @Override int getLatestTimeFast(); @Override V getLatestValue(); @Override int[] timesArrayFast(); @Override V[] valuesArray(); @Override LocalDateObjectEntryIterator<V> iterator(); @Override LocalDateObjectTimeSeries<V> subSeries(LocalDate startTime, LocalDate endTime); @Override LocalDateObjectTimeSeries<V> subSeries(LocalDate startTime, boolean includeStart, LocalDate endTime, boolean includeEnd); @Override LocalDateObjectTimeSeries<V> subSeriesFast(int startTime, int endTime); @Override LocalDateObjectTimeSeries<V> subSeriesFast(int startTime, boolean includeStart, int endTime, boolean includeEnd); @Override LocalDateObjectTimeSeries<V> head(int numItems); @Override LocalDateObjectTimeSeries<V> tail(int numItems); @Override @SuppressWarnings("unchecked") LocalDateObjectTimeSeries<V> lag(int days); @Override ImmutableLocalDateObjectTimeSeries<V> newInstance(LocalDate[] dates, V[] values); @Override LocalDateObjectTimeSeries<V> operate(UnaryOperator<V> operator); @Override LocalDateObjectTimeSeries<V> operate(V other, BinaryOperator<V> operator); @Override @SuppressWarnings("unchecked") LocalDateObjectTimeSeries<V> operate(DateObjectTimeSeries<?, V> other, BinaryOperator<V> operator); @SuppressWarnings("unchecked") @Override LocalDateObjectTimeSeries<V> unionOperate(DateObjectTimeSeries<?, V> other, BinaryOperator<V> operator); @Override LocalDateObjectTimeSeries<V> intersectionFirstValue(DateObjectTimeSeries<?, V> other); @Override LocalDateObjectTimeSeries<V> intersectionSecondValue(DateObjectTimeSeries<?, V> other); @Override LocalDateObjectTimeSeries<V> noIntersectionOperation(DateObjectTimeSeries<?, V> other); @Override LocalDateObjectTimeSeriesBuilder<V> toBuilder(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test(expectedExceptions = NullPointerException.class) public void test_of_LD_double_null() { ImmutableLocalDateDoubleTimeSeries.of((LocalDate) null, 2.0); }
@Test(expectedExceptions = IllegalArgumentException.class) public void test_of_LDArray_valueArray_wrongOrder() { LocalDate[] inDates = new LocalDate[] {LocalDate.of(2012, 6, 30), LocalDate.of(2012, 7, 1), LocalDate.of(2012, 6, 1)}; Float[] inValues = new Float[] {2.0f, 3.0f, 1.0f}; ImmutableLocalDateObjectTimeSeries.of(inDates, inValues); }
@Test(expectedExceptions = IllegalArgumentException.class) public void test_of_LDArray_valueArray_mismatchedArrays() { LocalDate[] inDates = new LocalDate[] {LocalDate.of(2012, 6, 30)}; Float[] inValues = new Float[] {2.0f, 3.0f}; ImmutableLocalDateObjectTimeSeries.of(inDates, inValues); }
@Test(expectedExceptions = NullPointerException.class) public void test_of_LDArray_valueArray_nullDates() { Float[] inValues = new Float[] {2.0f, 3.0f, 1.0f}; ImmutableLocalDateObjectTimeSeries.of((LocalDate[]) null, inValues); }
@Test(expectedExceptions = NullPointerException.class) public void test_of_LDArray_valueArray_nullValues() { LocalDate[] inDates = new LocalDate[] {LocalDate.of(2012, 6, 30), LocalDate.of(2012, 7, 1), LocalDate.of(2012, 6, 1)}; ImmutableLocalDateObjectTimeSeries.of(inDates, (Float[]) null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void test_of_intArray_valueArray_wrongOrder() { int[] inDates = new int[] {20120630, 20120701, 20120601}; Float[] inValues = new Float[] {2.0f, 3.0f, 1.0f}; ImmutableLocalDateObjectTimeSeries.of(inDates, inValues); }
@Test(expectedExceptions = IllegalArgumentException.class) public void test_of_intArray_valueArray_mismatchedArrays() { int[] inDates = new int[] {20120630}; Float[] inValues = new Float[] {2.0f, 3.0f}; ImmutableLocalDateObjectTimeSeries.of(inDates, inValues); }
@Test(expectedExceptions = NullPointerException.class) public void test_of_intArray_valueArray_nullDates() { Float[] inValues = new Float[] {2.0f, 3.0f, 1.0f}; ImmutableLocalDateObjectTimeSeries.of((int[]) null, inValues); }
@Test(expectedExceptions = NullPointerException.class) public void test_of_intArray_valueArray_nullValues() { int[] inDates = new int[] {20120630, 20120701}; ImmutableLocalDateObjectTimeSeries.of(inDates, (Float[]) null); }