public class ListTypeUtil extends Object
List<A> to List<B> even
if A extends B.| Constructor and Description |
|---|
ListTypeUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <R,T> List<R> |
toArrayListOfType(Collection<T> ls)
Converts a
Collection<T> to a new List<R> in O(n) time, as long as T can be
cast to R and added to List<R>. |
static <R,T> List<R> |
toArrayListOfType(T[] ls) |
public static <R,T> List<R> toArrayListOfType(Collection<T> ls)
Collection<T> to a new List<R> in O(n) time, as long as T can be
cast to R and added to List<R>.T - parameterR - parameterls - parameterpublic static <R,T> List<R> toArrayListOfType(T[] ls)
Copyright 2004-2021 Solace Corporation. All rights reserved.