public static < T > Stream < T > skipWhile ( Stream < T > source , Predicate < T > condition ) { return StreamSupport . stream ( SkipUntilSpliterator . over ( source . spliterator ( ) , condition . negate ( ) ) , false ) . onClose ( source :: close ) ; }
Construct a stream which skips values from the source stream for as long as they meet the supplied condition then streams every remaining value as soon as the first value is found which does not meet the condition .