* Example time-series code.
*/
public class TimeSeriesExample {
public static void timeSeriesExample(final PrintStream out) {
final LocalDateDoubleTimeSeriesBuilder ts1 = ImmutableLocalDateDoubleTimeSeries.builder();
ts1.put(LocalDate.of(2010, 1, 1), 2.1d);
ts1.put(LocalDate.of(2010, 1, 2), 2.2d);
ts1.put(LocalDate.of(2010, 1, 3), 2.3d);
out.println("ts1: " + ts1);
final LocalDateDoubleTimeSeries ts2 = ts1.build();
out.println("ts2: " + ts2);
final LocalDateDoubleTimeSeries ts3 = ImmutableLocalDateDoubleTimeSeries.of(
new LocalDate[] {LocalDate.of(2010, 1, 1), LocalDate.of(2010, 1, 2)},
new double[] {1.1d, 1.2d});