Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
This code casts a Collection to an abstract collection
(such as <code>List</code>, <code>Set</code>, or <code>Map</code>).
Ensure that you are guaranteed that the object is of the type
you are casting to. If all you need is to be able
to iterate through a collection, you don't need to cast it to a Set or List.
New to GrepCode? Check out our FAQ X