of_list


Description:

public static Seq<G> of_list<G> (List<G> list, TaskEnv? env = null)

Creates a new sequential seq of the given list.

The given list itself will not be modified by seq operations. and the list 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 list must not be modified while the iterator/spliterator is used.

The result seq of this method will show better performance than the result of of_collection.

Parameters:

list

a list

env

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

Returns:

the result seq