Creates a new data set that contains the given elements. The elements must all be of the same type, for example, all of the {@link String} or {@link Integer}. The sequence of elements must not be empty. Furthermore, the elements must be serializable (as defined in {@link java.io.Serializable}, because the execution environment may ship the elements into the cluster.
The framework will try and determine the exact type from the collection elements. In case of generic elements, it may be necessary to manually supply the type information via {@link #fromCollection(Collection,TypeInformation)}.
Note that this operation will result in a non-parallel data source, i.e. a data source with a degree of parallelism of one.
@param data The elements to make up the data set.
@return A DataSet representing the given list of elements.