code: public static <E extends BaseStyler> List<E> getStylers(Collection<? extends BaseStyler> stylers, Class<E> clazz)
         throws VectorPrintException {
        List<E> st = new ArrayList<>(1);
        for (BaseStyler s : stylers) {
           if (clazz.isAssignableFrom(s.getClass())) {
              st.add((E) s);
           }
        }
        return st;
     }
docs: get stylers with a certain baseclass from a collection of stylers.
  
  @param <E>
  @param stylers
  @param clazz
  @return
  @throws VectorPrintException