public static <T> List<T> listAndCast(Query query) {
@SuppressWarnings("unchecked")
List<T> list = query.list();
return list;
}
In the following line:
public static <T> List<T> listAndCast(Query query) {
Why do we need <T>
?