public static < E > List < E > all ( E [ ] array ) { final Function < Iterator < E > , ArrayList < E > > consumer = new ConsumeIntoCollection <> ( new ArrayListFactory < E > ( ) ) ; return consumer . apply ( new ArrayIterator <> ( array ) ) ; }
Yields all element of the array in a list .