@ SuppressWarnings ( "unchecked" ) public static < T > T asType ( Iterable iterable , Class < T > clazz ) { if ( Collection . class . isAssignableFrom ( clazz ) ) { return asType ( ( Collection ) toList ( iterable ) , clazz ) ; } return asType ( ( Object ) iterable , clazz ) ; }
Converts the given iterable to another type .