Total[][] retVal = new Total[totalLists.length][];
for (int i = 0; i < totalLists.length; i++) {
List<TotalNode> current = totalLists[i];
retVal[i] = new Total[current.size()];
for (int j = 0; j < current.size(); j++) {
retVal[i][j] = new Total(current.get(j));
}
}
return retVal;
}