DoubleColumn implements Column<DoubleColumnId> { public static DoubleColumn of(DoubleColumnId id, double value) { return builder(id).add(value).build(); } private  DoubleColumn(DoubleColumnId id, DoubleStream values, Map<String, String> metaData); static DoubleColumn of(DoubleColumnId id, double value); static DoubleColumn ofAll(DoubleColumnId id, double... values); static DoubleColumn ofAll(DoubleColumnId id, DoubleStream values); static Builder builder(DoubleColumnId id); @Override DoubleColumnId getId(); @Override int getRowCount(); @Override Map<String, String> getMetaData(); double getValueAt(int index); DoubleStream valueStream();  }
@Test public void of() { DoubleColumn column = DoubleColumn.of(ID, 42d); assertEquals(ID, column.getId()); assertEquals(1, column.getRowCount()); assertEquals(42d, column.getValueAt(0), DELTA); assertArrayEquals(new double[]{42}, column.valueStream().toArray(), DELTA); }