public static < T > Stream < List < T > > aggregateOnListCondition ( Stream < T > source , BiPredicate < List < T > , T > predicate ) { return StreamSupport . stream ( new AggregatingSpliterator <> ( source . spliterator ( ) , predicate ) , false ) . onClose ( source :: close ) ; }
Aggregates items from source stream . Similar to