The syntax of List.cast() method is:
List<R> cast<R>()
This cast() method of List returns a view of this list as a list of R
instances.
Parameter | Optional/Required | Description |
---|---|---|
R | required | the type to cast the elements of the list to |
List.cast() returns value of type List<R>
.