package de.duehl.swing.ui.start.filter.project.gateway.generics;

/*
 * Copyright 2021 Christian Dühl. All rights reserved.
 *
 * This program is free software. You can redistribute it and/or
 * modify it under the same terms as perl:
 *
 * general:  http://dev.perl.org/licenses/
 * GPL:      http://dev.perl.org/licenses/gpl1.html
 * artistic: http://dev.perl.org/licenses/artistic.html
 */

import de.duehl.swing.ui.filter.exceptions.FilterException;
import de.duehl.swing.ui.start.filter.project.data.TestFilterData;

public class GenericData2Concrete<Data> {

    public TestFilterData generic2Concrete(Data data) {
        if (data instanceof TestFilterData filterData) {
            return filterData;
        }
        else {
            throw new FilterException("Nicht vom erwarteten Typ TestFilterData!");
        }
    }

}
