// Yeah ignoring items that only the plus-one user knows about... can't really happen
}
@Override
public PreferenceArray getPreferencesForItem(long itemID) throws TasteException {
PreferenceArray delegatePrefs = delegate.getPreferencesForItem(itemID);
for (int i = 0; i < tempPrefs.length(); i++) {
if (tempPrefs.getItemID(i) == itemID) {
int length = delegatePrefs.length();
PreferenceArray newPreferenceArray = new GenericItemPreferenceArray(length + 1);
for (int j = 0; j < length; j++) {
newPreferenceArray.setUserID(j, delegatePrefs.getUserID(j));
newPreferenceArray.setItemID(j, delegatePrefs.getItemID(j));
newPreferenceArray.setValue(j, delegatePrefs.getValue(j));
}
newPreferenceArray.setUserID(length, tempPrefs.getUserID(i));
newPreferenceArray.setItemID(length, tempPrefs.getItemID(i));
newPreferenceArray.setValue(length, tempPrefs.getValue(i));
newPreferenceArray.sortByUser();
return newPreferenceArray;
}
}
return delegatePrefs;
}