diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-09-09 21:46:16 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-09-09 21:47:34 -0300 |
| commit | d766896972c9e9be4a9e0021ec5f4f0665901865 (patch) | |
| tree | 1f6473300ef86e0697d682360bea0d28fc144baa /BJC-Utils2/src/main/java/bjc/utils/ioutils/blocks/BlockReader.java | |
| parent | 40f3a28569366c4357fbda11d2fff3b77686d84f (diff) | |
Update
Most of it is documentation changes.
The rest is more work on BlockReaders, as well as a simple command
language for configuring them.
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/ioutils/blocks/BlockReader.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/ioutils/blocks/BlockReader.java | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/ioutils/blocks/BlockReader.java b/BJC-Utils2/src/main/java/bjc/utils/ioutils/blocks/BlockReader.java index dac535e..3c695c6 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/ioutils/blocks/BlockReader.java +++ b/BJC-Utils2/src/main/java/bjc/utils/ioutils/blocks/BlockReader.java @@ -34,6 +34,20 @@ public interface BlockReader extends AutoCloseable, Iterator<Block> { boolean nextBlock(); /** + * Retrieve the number of blocks that have been read so far. + * + * @return The number of blocks read so far. + */ + int getBlockCount(); + + @Override + void close() throws IOException; + + /* + * Methods with default impls. + */ + + /** * Execute an action for each remaining block. * * @param action @@ -45,16 +59,6 @@ public interface BlockReader extends AutoCloseable, Iterator<Block> { } } - /** - * Retrieve the number of blocks that have been read so far. - * - * @return The number of blocks read so far. - */ - int getBlockCount(); - - @Override - void close() throws IOException; - @Override default boolean hasNext() { return hasNextBlock(); @@ -66,4 +70,4 @@ public interface BlockReader extends AutoCloseable, Iterator<Block> { return getBlock(); } -}
\ No newline at end of file +} |
