Package org.jeasy.batch.core.filter
Class FilteredRecordsCollector<P>
- java.lang.Object
-
- org.jeasy.batch.core.filter.FilteredRecordsCollector<P>
-
- All Implemented Interfaces:
RecordFilter<P>,RecordProcessor<P,P>
public class FilteredRecordsCollector<P> extends java.lang.Object implements RecordFilter<P>
ARecordFilterthat saves filtered records for later use. This filter delegates record filtering to another filter.- Author:
- Somma Daniele, Mahmoud Ben Hassine
-
-
Constructor Summary
Constructors Constructor Description FilteredRecordsCollector(RecordFilter<P> delegate)Create a newFilteredRecordsCollector
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Record<P>>getFilteredRecords()Get filtered records.Record<P>processRecord(Record<P> record)Filter a record.
-
-
-
Constructor Detail
-
FilteredRecordsCollector
public FilteredRecordsCollector(RecordFilter<P> delegate)
Create a newFilteredRecordsCollector- Parameters:
delegate- the record filter to be used
-
-
Method Detail
-
processRecord
public Record<P> processRecord(Record<P> record)
Description copied from interface:RecordFilterFilter a record.- Specified by:
processRecordin interfaceRecordFilter<P>- Specified by:
processRecordin interfaceRecordProcessor<P,P>- Parameters:
record- the record to filter.- Returns:
- the input record if it should continue in the pipeline or
nullif the record should be filtered
-
-