public static Collection split ( Object self , Closure closure ) { List accept = new ArrayList ( ) ; List reject = new ArrayList ( ) ; return split ( closure , accept , reject , InvokerHelper . asIterator ( self ) ) ; }
Splits all items into two lists based on the closure condition . The first list contains all items matching the closure expression . The second list all those that don t .