Package jakarta.data

Interface Streamable<T>

All Superinterfaces:
Iterable<T>
All Known Subinterfaces:
KeysetAwarePage<T>, KeysetAwareSlice<T>, Page<T>, Slice<T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Streamable<T> extends Iterable<T>

Simple interface to ease streamability of Iterables. This is an interface and can therefore be used as the assignment target for a lambda expression or method reference.

Data is fetched once per Streamable instance; it is not re-fetched with each invocation of stream() and Iterable.iterator().

  • Method Summary

    Modifier and Type
    Method
    Description
    default Stream<T>
    Returns a sequential stream of results, which follow the order of the sort criteria if specified.

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • stream

      default Stream<T> stream()
      Returns a sequential stream of results, which follow the order of the sort criteria if specified.
      Returns:
      a stream of results.