Interface DataSource

All Known Implementing Classes:
AbstractDataSource, EmptyDataSource, ResourceDataSource, SimpleDataSource

@ConsumerType public interface DataSource
DataSource is an abstract collection of Resource.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Long
    Returns the total count or the total as far as it is known.
    default Long
    Returns the limit of this datasource.
    default Long
    Returns the offset of this datasource.
    Returns the data.
  • Method Details

    • iterator

      @Nonnull Iterator<Resource> iterator()
      Returns the data.
      Returns:
      The iterator of the data.
    • getOffset

      @CheckForNull default Long getOffset()
      Returns the offset of this datasource. It returns null by default.
      Returns:
      The offset of the datasource, or null when the offset is unknown or not set.
    • getLimit

      @CheckForNull default Long getLimit()
      Returns the limit of this datasource. It returns null by default.
      Returns:
      The limit of the datasource, or null when the offset is unknown or not set.
    • getGuessTotal

      @CheckForNull default Long getGuessTotal()
      Returns the total count or the total as far as it is known. It returns null by default.
      Returns:
      The total count, or null if it is not known.