-
- Type Parameters:
T
- The type managed by theRecords
.
- All Known Subinterfaces:
RecordReader<T>
- All Known Implementing Classes:
CompositeRecords
,CsvRecordReader
,CsvStringRecordReader
,RecordsImpl
public interface Records<T> extends Iterable<Record<T>>, Iterator<Record<T>>
A bunch ofRecord
instances is represented by aRecords
instance. As of efficiency reasons, aRecords
instance can be iterated through, returning a singleRecord
within each iteration. This approach is making it possible to query a DB in the background and just hold theRecord
instances being served next in theRecords
instance (in memory).The way how
Records
instances manage their relatedRecord
instances is implementation specific, a plain java implementation might use some kind of collection for storing theRecord
instances (this can get memory intensive and not applicable when working with big data). A DB implementation might retrieve theRecord
instances in blocks one by one, one after the other, by querying the DB accordingly (in terms of "next" result sets).
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Iterator<Record<T>>
iterator()
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
-