FileDataModel extends AbstractDataModel { @Override public LongPrimitiveIterator getItemIDs() throws TasteException { return delegate.getItemIDs(); } FileDataModel(File dataFile);  FileDataModel(File dataFile, boolean transpose, long minReloadIntervalMS); File getDataFile(); char getDelimiter(); static char determineDelimiter(String line); @Override LongPrimitiveIterator getUserIDs(); @Override PreferenceArray getPreferencesFromUser(long userID); @Override FastIDSet getItemIDsFromUser(long userID); @Override LongPrimitiveIterator getItemIDs(); @Override PreferenceArray getPreferencesForItem(long itemID); @Override Float getPreferenceValue(long userID, long itemID); @Override Long getPreferenceTime(long userID, long itemID); @Override int getNumItems(); @Override int getNumUsers(); @Override int getNumUsersWithPreferenceFor(long itemID); @Override int getNumUsersWithPreferenceFor(long itemID1, long itemID2); @Override void setPreference(long userID, long itemID, float value); @Override void removePreference(long userID, long itemID); @Override void refresh(Collection<Refreshable> alreadyRefreshed); @Override boolean hasPreferenceValues(); @Override float getMaxPreference(); @Override float getMinPreference(); @Override String toString(); static final long DEFAULT_MIN_RELOAD_INTERVAL_MS; }
@Test(expected = NoSuchElementException.class) public void testGetItems() throws Exception { LongPrimitiveIterator it = model.getItemIDs(); assertNotNull(it); assertTrue(it.hasNext()); assertEquals(123, it.nextLong()); assertTrue(it.hasNext()); assertEquals(234, it.nextLong()); assertTrue(it.hasNext()); assertEquals(456, it.nextLong()); assertTrue(it.hasNext()); assertEquals(654, it.nextLong()); assertTrue(it.hasNext()); assertEquals(789, it.nextLong()); assertTrue(it.hasNext()); assertEquals(999, it.nextLong()); assertFalse(it.hasNext()); it.next(); }