Interface RWIterable<T>

  • Type Parameters:
    T - The type of object that this iterates over
    All Superinterfaces:
    Iterable<T>, Iterator<T>
    All Known Subinterfaces:
    RuntimeListValue<T>

    public interface RWIterable<T>
    extends Iterable<T>, Iterator<T>
    A super interface of both Iterable and Iterator. This class has been introduced to maintain binary compatibility with older releases, while allowing new versions to return an Iterable, thus allowing them to be used in new style for-each loops.
    • Method Detail

      • stream

        default Stream<T> stream()
        Returns a sequential Stream with this RWIterable as its source.

        This method should be overridden when the Iterable.spliterator() method cannot return a spliterator that is IMMUTABLE, CONCURRENT, or late-binding. (See Iterable.spliterator() for details.)

        Returns:
        a sequential Stream over the elements in this RWIterable.
        Implementation Requirements
        The default implementation creates a sequential Stream from the RWIterable's Spliterator.