code: public <X> DataSource<X> fromCollection(Collection<X> data, TypeInformation<X> type) {
  		CollectionInputFormat.checkCollection(data, type.getTypeClass());
  		
  		return new DataSource<X>(this, new CollectionInputFormat<X>(data), type);
  	}
docs: Creates a DataSet from the given non-empty collection. The type of the data set is that
  of the elements in the collection. The elements need to be serializable (as defined by
  {@link java.io.Serializable}), because the framework may move the elements into the cluster
  if needed.
  <p>
  Note that this operation will result in a non-parallel data source, i.e. a data source with
  a degree of parallelism of one.
  <p>
  The returned DataSet is typed to the given TypeInformation.
  
  @param data The collection of elements to create the data set from.
  @param type The TypeInformation for the produced data set.
  @return A DataSet representing the given collection.
  
  @see #fromCollection(Collection)