public static < T > Stream < T > takeUntil ( Stream < T > source , Predicate < T > condition ) { return takeWhile ( source , condition . negate ( ) ) ; }
Construct a stream which takes values from the source stream until one of them meets the supplied condition and then stops .