of_collection


Description:

public static Seq<G> of_collection<G> (Collection<G> collection, TaskEnv? env = null)

Creates a new sequential seq of the given collection.

The given collection itself will not be modified by seq operations. and the collection must not be modified until the execution of the seq pipeline is completed. Except for the non-eager operations iterator() and spliterator(), execution is performed when the terminal operation is invoked. In case of the non-eager operations, the collection must not be modified while the iterator/spliterator is used.

Parameters:

collection

a collection

env

a task environment. If not specified, TaskEnv.get_common_task_env is used.

Returns:

the result seq