code: @SuppressWarnings("unchecked")
      public <T> T[] toArray(Set<T> set) {
  	    if (set == null) {
  	        return null;
  	    }
  	    
  		return (T[]) set.toArray(new Object[set.size()]);
  	}
docs: Convert the given set to an array.
  
  @param <T> The component type of the set
  
  @param set The set to convert
  
  @return An array representing the elements in the set
  
  @see Set#toArray()