code: public static <T> List<T> removeTypes(final List<T> list, final List<Class<? extends T>> filter) {
          final Iterator it = list.iterator();
          while (it.hasNext()) {
              final Class type = it.next().getClass();
              if (filter.contains(type)) {
                  it.remove();
              }
          }
          return list;
      }
docs: Filter list from objects of type present in filter list.
  
  @param list   list to filter
  @param filter types to filter
  @param <T>    required type
  @return filtered list