for (String line : new FileLineIterable(movieFile, true)) {
int firstComma = line.indexOf((int) ',');
Integer userID = Integer.valueOf(line.substring(0, firstComma));
int secondComma = line.indexOf((int) ',', firstComma + 1);
double rating = Double.parseDouble(line.substring(firstComma + 1, secondComma));
prefs.add(new GenericPreference(getUser(userID), movie, rating));
}
return prefs.toArray(new Preference[prefs.size()]);
}