Use the Google Guava filter.
Collections2.filter(yourOriginalCollection, new Predicate<Object>() { public boolean apply(Object obj) { return obj instanceof TypeYouAreInterestedIn; } });
Or in Java 8:
Collections2.filter(yourOriginalCollection, (obj) -> obj instanceof TypeYouAreInterestedIn);
source share