// Then line is of form "userID,itemID,", meaning remove
if (prefs != null) {
// remove pref
Iterator<Preference> prefsIterator = prefs.iterator();
while (prefsIterator.hasNext()) {
Preference pref = prefsIterator.next();
if (pref.getItemID() == itemID) {
prefsIterator.remove();
break;
}
}
}
removeTimestamp(userID, itemID, timestamps);
} else {
float preferenceValue = Float.parseFloat(preferenceValueString);
boolean exists = false;
if (prefs != null) {
for (Preference pref : prefs) {
if (pref.getItemID() == itemID) {
exists = true;
pref.setValue(preferenceValue);
break;
}
}
}