IterableExtension<E> extension

Iterable extension extends the functionality of the native Iterable type by adding a couple of useful methods.

Adds as method to cast the Iterable as a lazy Iterable of Type by applying the given transformation function to each underlying item.

Adds asList method to cast the Iterable as a lazy Iterable of Type and return as List of Type by applying the given transformation function to each underlying item.

on

Methods

as<T>(T f(E e)) Iterable<T>
Returns a new lazy Iterable of Type by applying the transformation function.
asList<T>(T f(E e)) List<T>
Returns a new List of Type by applying the transformation function.