Interface Records<T>

  • Type Parameters:
    T - The type managed by the Records.
    All Superinterfaces:
    java.lang.Iterable<Record<T>>, java.util.Iterator<Record<T>>
    All Known Subinterfaces:
    All Known Implementing Classes:
    CompositeRecords, CsvRecordsReader, CsvStringRecordsReader, RecordsImpl

    public interface Records<T>
    extends java.lang.Iterable<Record<T>>, java.util.Iterator<Record<T>>
    A bunch of Record instances is represented by a Records instance. As of efficiency reasons, a Records instance can be iterated through, returning a single Record within each iteration. This approach is making it possible to query a DB in the background and just hold the Record instances being served next in the Records instance (in memory).

    The way how Records instances manage their related Record instances is implementation specific, a plain java implementation might use some kind of collection for storing the Record instances (this can get memory intensive and not applicable when working with big data). A DB implementation might retrieve the Record 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 java.util.Iterator<Record<T>> iterator​()
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, hasNext, next, remove
    • Method Detail

      • iterator

        default java.util.Iterator<Record<T>> iterator​()
        Specified by:
        iterator in interface java.lang.Iterable<T>