public void remove(Class<? extends T> type) throws IOException {
        for (T t : data) {
            if(t.getClass()==type) {
                data.remove(t);
                onModified();
                return;
            }
        }
    }
public void remove ( Class < ? extends T > type ) throws IOException { for ( T t : data ) { if ( t . getClass ( ) == type ) { data . remove ( t ) ; onModified ( ) ; return ; } } }
Removes an instance by its type.