@Test(expected = IllegalArgumentException.class) public void testGetLessThanMin() throws IOException { EntryIndexFile file = new EntryIndexFile(makeEntryIndexFileContent(3, 4)); file.get(2); }
@Nonnull public EntryIndexItem get(int entryIndex) { checkEmpty(); if (entryIndex < minEntryIndex || entryIndex > maxEntryIndex) { throw new IllegalArgumentException("index < min or index > max"); } return entryIndexMap.get(entryIndex); }
EntryIndexFile implements Iterable<EntryIndexItem> { @Nonnull public EntryIndexItem get(int entryIndex) { checkEmpty(); if (entryIndex < minEntryIndex || entryIndex > maxEntryIndex) { throw new IllegalArgumentException("index < min or index > max"); } return entryIndexMap.get(entryIndex); } }
EntryIndexFile implements Iterable<EntryIndexItem> { @Nonnull public EntryIndexItem get(int entryIndex) { checkEmpty(); if (entryIndex < minEntryIndex || entryIndex > maxEntryIndex) { throw new IllegalArgumentException("index < min or index > max"); } return entryIndexMap.get(entryIndex); } EntryIndexFile(File file);  EntryIndexFile(SeekableFile seekableFile); }
EntryIndexFile implements Iterable<EntryIndexItem> { @Nonnull public EntryIndexItem get(int entryIndex) { checkEmpty(); if (entryIndex < minEntryIndex || entryIndex > maxEntryIndex) { throw new IllegalArgumentException("index < min or index > max"); } return entryIndexMap.get(entryIndex); } 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> { @Nonnull public EntryIndexItem get(int entryIndex) { checkEmpty(); if (entryIndex < minEntryIndex || entryIndex > maxEntryIndex) { throw new IllegalArgumentException("index < min or index > max"); } return entryIndexMap.get(entryIndex); } 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();  }