public < U > StreamEx < U > intervalMap ( BiPredicate < ? super T , ? super T > sameInterval , BiFunction < ? super T , ? super T , ? extends U > mapper ) { return collapseInternal ( sameInterval , PairBox :: single , ( box , t ) -> { box . b = t ; return box ; } , ( left , right ) -> { left . b = right . b ; return left ; } ) . map ( pair -> mapper . apply ( pair . a , pair . b ) ) ; }
Returns a stream consisting of results of applying the given function to the intervals created from the source elements .