private static final String[] collectionToStrings(Collection c){
  return c == null ? null : (String[])c.toArray(new String[c.size()]);
}

private static final String [ ] collectionToStrings ( Collection c ) { return c == null ? null : ( String [ ] ) c . toArray ( new String [ c . size ( ) ] ) ; }
converts a collection to an array of strings .
