Feature fname = type.getFeatureByBaseName(NAMES);
Feature ftotal = type.getFeatureByBaseName(TOTALS);
Feature famount = type.getFeatureByBaseName(AMOUNTS);
Feature fparts = type.getFeatureByBaseName(PARTS);
StringArrayFSImpl vname = (StringArrayFSImpl) fs.getFeatureValue(fname);
DoubleArrayFSImpl vtotal = (DoubleArrayFSImpl) fs.getFeatureValue(ftotal);
IntArrayFSImpl vamount = (IntArrayFSImpl) fs.getFeatureValue(famount);
DoubleArrayFSImpl vpart = (DoubleArrayFSImpl) fs.getFeatureValue(fparts);
String[] narray = new String[0];
if(vname != null) {
narray = vname.toArray();
}
double[] tarray = vtotal.toArray();
int[] aarray = vamount.toArray();
double[] parray = vpart.toArray();
int i = 0;
for (String each : narray) {
result.add(new StatisticsEntry(each, tarray[i], aarray[i], parray[i]));
i++;