class CsvParameterEntryBatchLoader implements ParameterEntryBatchLoader {

    @Override
    public Collection<ParameterEntry> nextBatch(int batchSize) {
        List<ParameterEntry> entries = new ArrayList<ParameterEntry>(batchSize);

        try {
            List<String> line;
            int entriesRead;
            for (entriesRead = 0; entriesRead < batchSize; ++entriesRead) {
                line = reader.read();
                if (line == null) {
                    break;
                }
                entries.add(new DeserializedParameterEntry(line));
            }

            if (entriesRead < batchSize) {
                hasMore = false;
            }
        } catch (IOException exception) {
            throw new ParamBatchLoadingException("deserialization error", exception);
        }

        return entries;
    }

    public  CsvParameterEntryBatchLoader(CsvListReader reader);

}