Here you can find the source of getSubList(List entireList, Class cls)
public static List getSubList(List entireList, Class cls)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { /**//w w w . ja v a 2s. c o m * get report elements * @return */ public static List getSubList(List entireList, Class cls) { List list = new ArrayList(); for (Object e : entireList) { if (cls.isInstance(e)) list.add(cls.cast(e)); } return list; } }