Constructor and Description |
---|
TransformCsvMapper(CsvMapper<I> delegate,
org.simpleflatmapper.util.Function<I,O> transformer) |
Modifier and Type | Method and Description |
---|---|
<H extends org.simpleflatmapper.util.CheckedConsumer<? super O>> |
forEach(org.simpleflatmapper.lightningcsv.CsvReader reader,
H handle)
Will map each row of the content of reader to an object of type T and will pass that object to the handle via the
CheckedConsumer .handler(T t) call back. |
<H extends org.simpleflatmapper.util.CheckedConsumer<? super O>> |
forEach(org.simpleflatmapper.lightningcsv.CsvReader reader,
H handle,
int limit)
Will map each row of the content of reader, starting at rowStart and ending before rowEnd, to an object of type T and will pass that object to the handle via the
CheckedConsumer .handler(T t) call back. |
<H extends org.simpleflatmapper.util.CheckedConsumer<? super O>> |
forEach(Reader reader,
H handle)
Will map each row of the content of reader to an object of type T and will pass that object to the handle via the
CheckedConsumer .handler(T t) call back. |
<H extends org.simpleflatmapper.util.CheckedConsumer<? super O>> |
forEach(Reader reader,
H handle,
int skip)
Will map each row of the content of reader, starting at rowStart, to an object of type T and will pass that object to the handle via the
CheckedConsumer .handler(T t) call back. |
<H extends org.simpleflatmapper.util.CheckedConsumer<? super O>> |
forEach(Reader reader,
H handle,
int skip,
int limit)
Will map each row of the content of reader, starting at rowStart and ending before rowEnd, to an object of type T and will pass that object to the handle via the
CheckedConsumer .handler(T t) call back. |
Iterator<O> |
iterator(org.simpleflatmapper.lightningcsv.CsvReader reader)
Will return an iterator on the reader that will return a mapped object for each row.
|
Iterator<O> |
iterator(Reader reader)
Will return an iterator on the reader that will return a mapped object for each row.
|
Iterator<O> |
iterator(Reader reader,
int skip)
Will return an iterator on the reader that will return a mapped object for each row.
|
Stream<O> |
stream(org.simpleflatmapper.lightningcsv.CsvReader reader)
Will return a Stream of T
|
Stream<O> |
stream(Reader reader)
Will return a Stream of T
|
Stream<O> |
stream(Reader reader,
int skip)
Will return a Stream of T.
|
public <H extends org.simpleflatmapper.util.CheckedConsumer<? super O>> H forEach(Reader reader, H handle) throws IOException, org.simpleflatmapper.map.MappingException
CsvMapper
CheckedConsumer
.handler(T t) call back.
The method will return the handler passed as an argument so you can easily chain the calls like
List<T> list = jdbcMapper.forEach(reader, new ListHandler<T>()).getList();
forEach
in interface CsvMapper<O>
H
- the row handler typereader
- the readerhandle
- the callback newInstanceIOException
- if an io error occursorg.simpleflatmapper.map.MappingException
- if an mapping error occurspublic <H extends org.simpleflatmapper.util.CheckedConsumer<? super O>> H forEach(org.simpleflatmapper.lightningcsv.CsvReader reader, H handle) throws IOException, org.simpleflatmapper.map.MappingException
CsvMapper
CheckedConsumer
.handler(T t) call back.forEach
in interface CsvMapper<O>
H
- the row handler typereader
- the readerhandle
- the callback newInstanceIOException
- if an io error occursorg.simpleflatmapper.map.MappingException
- if an mapping error occurspublic <H extends org.simpleflatmapper.util.CheckedConsumer<? super O>> H forEach(Reader reader, H handle, int skip) throws IOException, org.simpleflatmapper.map.MappingException
CsvMapper
CheckedConsumer
.handler(T t) call back.forEach
in interface CsvMapper<O>
H
- the row handler typereader
- the readerhandle
- the callback newInstanceskip
- the number of row to skipIOException
- if an io error occursorg.simpleflatmapper.map.MappingException
- if an mapping error occurspublic <H extends org.simpleflatmapper.util.CheckedConsumer<? super O>> H forEach(Reader reader, H handle, int skip, int limit) throws IOException, org.simpleflatmapper.map.MappingException
CsvMapper
CheckedConsumer
.handler(T t) call back.forEach
in interface CsvMapper<O>
H
- the row handler typereader
- the readerhandle
- the callback newInstanceskip
- the number of row to skiplimit
- the number of row to processIOException
- if an io error occursorg.simpleflatmapper.map.MappingException
- if an mapping error occurspublic <H extends org.simpleflatmapper.util.CheckedConsumer<? super O>> H forEach(org.simpleflatmapper.lightningcsv.CsvReader reader, H handle, int limit) throws IOException, org.simpleflatmapper.map.MappingException
CsvMapper
CheckedConsumer
.handler(T t) call back.forEach
in interface CsvMapper<O>
H
- the row handler typereader
- the readerhandle
- the callback newInstancelimit
- the number of row to processIOException
- if an io error occursorg.simpleflatmapper.map.MappingException
- if an mapping error occurspublic Iterator<O> iterator(Reader reader) throws IOException
CsvMapper
iterator
in interface CsvMapper<O>
reader
- the readerIOException
- if an io error occurspublic Iterator<O> iterator(org.simpleflatmapper.lightningcsv.CsvReader reader) throws IOException
CsvMapper
iterator
in interface CsvMapper<O>
reader
- the readerIOException
- if an io error occurspublic Iterator<O> iterator(Reader reader, int skip) throws IOException
CsvMapper
iterator
in interface CsvMapper<O>
reader
- the readerskip
- the number of row to skipIOException
- if an io error occurspublic Stream<O> stream(Reader reader) throws IOException
CsvMapper
stream
in interface CsvMapper<O>
reader
- the readerIOException
- if an io error occurspublic Stream<O> stream(org.simpleflatmapper.lightningcsv.CsvReader reader) throws IOException
CsvMapper
stream
in interface CsvMapper<O>
reader
- the readerIOException
- if an io error occurspublic Stream<O> stream(Reader reader, int skip) throws IOException
CsvMapper
stream
in interface CsvMapper<O>
reader
- the readerskip
- the number of row to skipIOException
- if an io error occursCopyright © 2018. All rights reserved.