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 ; }
get stylers with a certain baseclass from a collection of stylers .