persistable sclass TickerSequence { new LongBuffer timestamps; new DoubleBuffer prices; void add(double price, long timestamp) { timestamps.add(timestamp); prices.add(price); } void add(double[] prices, long[] timestamps) { assertEquals(l(prices()), l(timestamps)); this.prices.addAll(asList(prices)); this.timestamps.addAll(asList(timestamps)); } toString { ret "TickerSequence length " + n2(l(prices)); } }