public Interval locate(DataColumn column, Integer intervalIndex) { ColumnGroup columnGroup = column.getColumnGroup(); if (columnGroup == null) return null; if (intervalIndex == null) return null; IntervalListLabel intervalList = new IntervalListLabel(columnGroup); intervalList.indexValues(column.getValues(), null); if (intervalIndex >= intervalList.size()) return null; return intervalList.get(intervalIndex); }
public IntervalList build(DataColumn dataColumn) { ColumnGroup columnGroup = dataColumn.getColumnGroup(); IntervalListLabel intervalList = new IntervalListLabel(columnGroup); List values = dataColumn.getValues(); return intervalList.indexValues(values, null); }
private void assertColumnIdAndType(DataSet result, String columnId, ColumnType columnType) { DataColumn amountCol = result.getColumnById(columnId); Assert.assertNotNull(amountCol); Assert.assertEquals(amountCol.getColumnType(), columnType); }