Interface PerceptionCollectable<H extends Headway,​U>

    • Method Detail

      • collect

        default <C,​I> C collect​(PerceptionCollectable.PerceptionCollector<C,​? super U,​I> collector)
        Collect the underlying objects in to a perceived result. This methodology is loosely based on Stream.collect().
        Type Parameters:
        C - collection result type
        I - intermediate type
        Parameters:
        collector - PerceptionCollector<C, ? super U, I>; collector
        Returns:
        C; collection result
      • collect

        <C,​I> C collect​(Supplier<I> identity,
                              PerceptionCollectable.PerceptionAccumulator<? super U,​I> accumulator,
                              PerceptionCollectable.PerceptionFinalizer<C,​I> finalizer)
        Collect the underlying objects in to a perceived result. This methodology is loosely based on Stream.collect().
        Type Parameters:
        C - collection result type
        I - intermediate type
        Parameters:
        identity - Supplier<I>; the initial intermediate result value
        accumulator - PerceptionAccumulator<? super U, I>; accumulator
        finalizer - PerceptionFinalizer<C, I>; finalizer
        Returns:
        C; collection result
      • underlying

        Iterator<U> underlying()
        Returns an iterator over the underlying objects.
        Returns:
        Iterator<U>; iterator