@Test public void testIteratorEmpty() throws IOException { EntryIndexFile file = new EntryIndexFile(new ByteArraySeekableFile()); Iterator<EntryIndexItem> iterator = file.iterator(); Assert.assertFalse(iterator.hasNext()); }
@Override @Nonnull public Iterator<EntryIndexItem> iterator() { if (isEmpty()) { return Collections.emptyIterator(); } return new EntryIndexIterator(entryIndexCount, minEntryIndex); }
EntryIndexFile implements Iterable<EntryIndexItem> { @Override @Nonnull public Iterator<EntryIndexItem> iterator() { if (isEmpty()) { return Collections.emptyIterator(); } return new EntryIndexIterator(entryIndexCount, minEntryIndex); } }
EntryIndexFile implements Iterable<EntryIndexItem> { @Override @Nonnull public Iterator<EntryIndexItem> iterator() { if (isEmpty()) { return Collections.emptyIterator(); } return new EntryIndexIterator(entryIndexCount, minEntryIndex); } EntryIndexFile(File file);  EntryIndexFile(SeekableFile seekableFile); }
EntryIndexFile implements Iterable<EntryIndexItem> { @Override @Nonnull public Iterator<EntryIndexItem> iterator() { if (isEmpty()) { return Collections.emptyIterator(); } return new EntryIndexIterator(entryIndexCount, minEntryIndex); } EntryIndexFile(File file);  EntryIndexFile(SeekableFile seekableFile); boolean isEmpty(); int getMinEntryIndex(); int getMaxEntryIndex(); int getEntryIndexCount(); void appendEntryIndex(int index, long offset, int kind, int term); void clear(); void removeAfter(int newMaxEntryIndex); long getOffset(int entryIndex); @Nonnull EntryIndexItem get(int entryIndex); @Override @Nonnull Iterator<EntryIndexItem> iterator(); void close(); }
EntryIndexFile implements Iterable<EntryIndexItem> { @Override @Nonnull public Iterator<EntryIndexItem> iterator() { if (isEmpty()) { return Collections.emptyIterator(); } return new EntryIndexIterator(entryIndexCount, minEntryIndex); } EntryIndexFile(File file);  EntryIndexFile(SeekableFile seekableFile); boolean isEmpty(); int getMinEntryIndex(); int getMaxEntryIndex(); int getEntryIndexCount(); void appendEntryIndex(int index, long offset, int kind, int term); void clear(); void removeAfter(int newMaxEntryIndex); long getOffset(int entryIndex); @Nonnull EntryIndexItem get(int entryIndex); @Override @Nonnull Iterator<EntryIndexItem> iterator(); void close();  }