public interface Reader extends Iterator<OptionalTypesMap<String,Serializable>>, Iterable<OptionalTypesMap<String,Serializable>>
The Readers should be iterable so we have default methods for having nice for loops and things.
Created by mackaiver on 14/12/16.
| Modifier and Type | Method and Description |
|---|---|
OptionalTypesMap<String,Serializable> |
getNextRow()
Get the data from the next row.
|
boolean |
hasNext()
Check whether there is another row to return from this heap
|
default Iterator<OptionalTypesMap<String,Serializable>> |
iterator()
Get the iterator for this Reader.
|
default OptionalTypesMap<String,Serializable> |
next()
Get the data from the next row.
|
void |
skipRows(int amount)
Skips the given number of rows.
|
forEachRemaining, removeforEach, spliteratordefault OptionalTypesMap<String,Serializable> next() throws NoSuchElementException
This method overwrites the next() method of the iterable interface and is similar to the
next in interface Iterator<OptionalTypesMap<String,Serializable>>NoSuchElementException - iff hasNext() is falsemethod but throws a runtime exception when an IO error occurs.default Iterator<OptionalTypesMap<String,Serializable>> iterator()
iterator in interface Iterable<OptionalTypesMap<String,Serializable>>boolean hasNext()
Readers implementing this interface have to overwrite this method.
hasNext in interface Iterator<OptionalTypesMap<String,Serializable>>OptionalTypesMap<String,Serializable> getNextRow() throws IOException
Readers implementing this interface have to overwrite this method.
IOException - if some IO error occursvoid skipRows(int amount)
throws IOException
num - The amount of rows to skip.IOExceptionCopyright © 2019. All rights reserved.