@ SuppressWarnings ( "unchecked" ) public static int getLength ( Object iterable ) { Assert . state ( isIterable ( iterable . getClass ( ) ) ) ; return iterable . getClass ( ) . isArray ( ) ? Array . getLength ( iterable ) : ( ( Collection < Object > ) iterable ) . size ( ) ; }
Gets the length of an iterable .