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.gateway.TestFilterType;

public class GenericType2Concrete<Type> {

    public TestFilterType generic2Concrete(Type type) {
        if (type instanceof TestFilterType filterType) {
            return filterType;
        }
        else {
            throw new FilterException("Nicht vom erwarteten Typ TestFilterType!");
        }
    }

}
