public static boolean isEmpty ( Iterable < ? > iterable ) { if ( iterable == null ) { return true ; } if ( iterable instanceof RichIterable ) { return ( ( RichIterable < ? > ) iterable ) . isEmpty ( ) ; } if ( iterable instanceof Collection ) { return ( ( Collection < ? > ) iterable ) . isEmpty ( ) ; } return IterableIterate . isEmpty ( iterable ) ; }
A null - safe check on a collection to see if it isEmpty . A null collection results in a true .