@Test public void testCreate() { TimeSeriesIndex index = new TestTimeSeriesIndex(0L, 3); StringTimeSeries ts1 = TimeSeries.createString("ts1", index, "a", "b", "c"); assertEquals("ts1", ts1.getMetadata().getName()); assertEquals(TimeSeriesDataType.STRING, ts1.getMetadata().getDataType()); assertArrayEquals(new String[] {"a", "b", "c"}, ts1.toArray()); }
public String[] toArray() { CompactStringBuffer buffer = new CompactStringBuffer(ByteBuffer::allocate, metadata.getIndex().getPointCount()); chunks.forEach(chunk -> chunk.fillBuffer(buffer, 0)); return buffer.toArray(); }
StringTimeSeries extends AbstractTimeSeries<StringPoint, StringDataChunk, StringTimeSeries> implements TimeSeries<StringPoint, StringTimeSeries> { public String[] toArray() { CompactStringBuffer buffer = new CompactStringBuffer(ByteBuffer::allocate, metadata.getIndex().getPointCount()); chunks.forEach(chunk -> chunk.fillBuffer(buffer, 0)); return buffer.toArray(); } }
StringTimeSeries extends AbstractTimeSeries<StringPoint, StringDataChunk, StringTimeSeries> implements TimeSeries<StringPoint, StringTimeSeries> { public String[] toArray() { CompactStringBuffer buffer = new CompactStringBuffer(ByteBuffer::allocate, metadata.getIndex().getPointCount()); chunks.forEach(chunk -> chunk.fillBuffer(buffer, 0)); return buffer.toArray(); } StringTimeSeries(TimeSeriesMetadata metadata, StringDataChunk... chunks);  StringTimeSeries(TimeSeriesMetadata metadata, List<StringDataChunk> chunks); }
StringTimeSeries extends AbstractTimeSeries<StringPoint, StringDataChunk, StringTimeSeries> implements TimeSeries<StringPoint, StringTimeSeries> { public String[] toArray() { CompactStringBuffer buffer = new CompactStringBuffer(ByteBuffer::allocate, metadata.getIndex().getPointCount()); chunks.forEach(chunk -> chunk.fillBuffer(buffer, 0)); return buffer.toArray(); } StringTimeSeries(TimeSeriesMetadata metadata, StringDataChunk... chunks);  StringTimeSeries(TimeSeriesMetadata metadata, List<StringDataChunk> chunks); void fillBuffer(CompactStringBuffer buffer, int timeSeriesOffset); void fillBuffer(BigStringBuffer buffer, long timeSeriesOffset); String[] toArray(); }
StringTimeSeries extends AbstractTimeSeries<StringPoint, StringDataChunk, StringTimeSeries> implements TimeSeries<StringPoint, StringTimeSeries> { public String[] toArray() { CompactStringBuffer buffer = new CompactStringBuffer(ByteBuffer::allocate, metadata.getIndex().getPointCount()); chunks.forEach(chunk -> chunk.fillBuffer(buffer, 0)); return buffer.toArray(); } StringTimeSeries(TimeSeriesMetadata metadata, StringDataChunk... chunks);  StringTimeSeries(TimeSeriesMetadata metadata, List<StringDataChunk> chunks); void fillBuffer(CompactStringBuffer buffer, int timeSeriesOffset); void fillBuffer(BigStringBuffer buffer, long timeSeriesOffset); String[] toArray();  }