public static <T>Iterator<T> toIterator(Collection<T> col){
  if (col == null)   return null;
 else   return col.iterator();
}

public static < T > Iterator < T > toIterator ( Collection < T > col ) { if ( col == null ) return null ; else return col . iterator ( ) ; }
get an iterator from a collection , returning null if collection is null
