}
Iterator dataNames = data.getKeys();
String name, subname;
int prefixLength = dataPrefix.length();
DoubleData val;
while (dataNames.hasNext()) {
name = (String) dataNames.next();
if (name.startsWith(dataPrefix)) {
subname = name.substring(prefixLength);
if (subname.endsWith(DEF_INJ_SUFFIX) ||
subname.endsWith(DEF_REM_SUFFIX)) {
Object o = data.getValue(name);
if (!(o instanceof DoubleData) || o instanceof NumberFunction)
// Don't overwrite calculations, which are
continue; // typically summing up values from other places
val = new DoubleData(phaseData.extractValue(subname));
val.setEditable(false);
data.putValue(name, val);
}
}
}
dataNames = phaseData.keySet().iterator();
while (dataNames.hasNext()) {
subname = (String) dataNames.next();
name = data.createDataName(dataPrefix, subname);
val = new DoubleData(phaseData.extractValue(subname));
val.setEditable(false);
data.putValue(name, val);
}
}