Please consider the following snippet:
public interface MyInterface { public int getId(); } public class MyPojo implements MyInterface { private int i
Choosing the right type from the start is best, however to answer your question you can use type erasure.
return (ArrayList) (ArrayList) myPojos;