public class ListItemReader<T> extends java.lang.Object implements ItemReader<T>
ItemReader
that pulls data from a list. Useful for testing.Constructor and Description |
---|
ListItemReader(java.util.List<T> list) |
Modifier and Type | Method and Description |
---|---|
T |
read()
Reads a piece of input data and advance to the next one.
|
public ListItemReader(java.util.List<T> list)
@Nullable public T read()
ItemReader
null
at the end of the input
data set. In a transactional setting, caller might get the same item
twice from successive calls (or otherwise), if the first call was in a
transaction that rolled back.read
in interface ItemReader<T>
null
if the data source is
exhausted