diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2017-04-10 16:40:33 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2017-04-10 16:40:33 -0400 |
| commit | 889fac2bdf993dc86f64a8893c0260fdcf848acb (patch) | |
| tree | 99ed08552efa86fdc5fdf4ddb8720d10e599fafe /BJC-Utils2/src/main/java/bjc/utils/ioutils/blocks/BlockReader.java | |
| parent | 1656b02144446aeedebb3d1179e07ed99c01861c (diff) | |
Cleanup
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 | 15 |
1 files changed, 8 insertions, 7 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 d45a4f3..dac535e 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 @@ -7,39 +7,39 @@ import java.util.function.Consumer; /** * A source of blocks of characters, marked with line numbers as to block * start/block end. - * + * * @author bjculkin * */ public interface BlockReader extends AutoCloseable, Iterator<Block> { /** * Check if this reader has an available block. - * + * * @return Whether or not another block is available. */ boolean hasNextBlock(); /** * Get the current block. - * + * * @return The current block, or null if there is no current block. */ Block getBlock(); /** * Move to the next block. - * + * * @return Whether or not the next block was successfully read. */ boolean nextBlock(); /** * Execute an action for each remaining block. - * + * * @param action * The action to execute for each block */ - default void forEachBlock(Consumer<Block> action) { + default void forEachBlock(final Consumer<Block> action) { while (hasNext()) { action.accept(next()); } @@ -47,11 +47,12 @@ 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 |
