/** Registers variables in the filter */ public void register(DataFilter filter) { if (varName != null) { filter.addData(DataCollectorDescription.VARIABLE, varName); } else if (function != null) { function.register(filter); } }
/** Reads a value from the data */ public Double getValue(DataRow data) throws Exception { Double value; if (varName != null) { value = data.getVarDoubleValue(varName); } else if (function != null) { value = function.evaluate(data); } else { return null; } return value; }