public static < T > Collection < Collection < T > > split ( T [ ] self , @ ClosureParams ( FirstParam . Component . class ) Closure closure ) { List < T > accept = new ArrayList < T > ( ) ; List < T > reject = new ArrayList < T > ( ) ; Iterator < T > iter = new ArrayIterator < T > ( self ) ; return split ( closure , accept , reject , iter ) ; }
Splits all items into two collections based on the closure condition . The first list contains all items which match the closure expression . The second list all those that don t .