public static < T > List < T > toList ( final Collection < T > collection ) { if ( isEmpty ( collection ) ) { return new ArrayList < T > ( 0 ) ; } else { return new ArrayList < T > ( collection ) ; } }
Convert given collection to a list .