private RunList < R > limit ( final CountingPredicate < R > predicate ) { size = null ; first = null ; final Iterable < R > nested = base ; base = new Iterable < R > ( ) { public Iterator < R > iterator ( ) { return hudson . util . Iterators . limit ( nested . iterator ( ) , predicate ) ; } @ Override public String toString ( ) { return Iterables . toString ( this ) ; } } ; return this ; }
Returns the first streak of the elements that satisfy the given predicate .