public class HAUtils{
public static List<String> objToList(Object obj) throw CoreException{
List<String> result = new ArrayList<String>();
if (obj instanceof ArrayList<?>) {
for (Object o : (List<?>) obj) {
result.add(String.class.cast(o));
}
}
return result;
}
}
public class HAUtils{
public static <T> List<T> objToList(Object obj, Class<T> cla) throw CoreException{
List<T> list = new ArrayList<T>();
if (obj instanceof ArrayList<?>) {
for (Object o : (List<?>) obj) {
list.add(cla.cast(o));
}
return list;
}
return null;
}
}