Skip to content

Package: FunctionE

FunctionE

Coverage

1: /*
2: * Copyright © 2020-2023-2023 Fachhochschule für die Wirtschaft (FHDW) Hannover
3: *
4: * This file is part of gaming-core.
5: *
6: * Gaming-core is free software: you can redistribute it and/or modify it under
7: * the terms of the GNU General Public License as published by the Free Software
8: * Foundation, either version 3 of the License, or (at your option) any later
9: * version.
10: *
11: * Gaming-core is distributed in the hope that it will be useful, but WITHOUT
12: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14: * details.
15: *
16: * You should have received a copy of the GNU General Public License along with
17: * gaming-core. If not, see <http://www.gnu.org/licenses/>.
18: */
19: package de.fhdw.gaming.core.domain.util;
20:
21: /**
22: * A variant of {@link java.util.function.Function} which may throw a checked exception.
23: *
24: * @param <T> Type of input.
25: * @param <R> Type of output.
26: * @param <E> Type of exception.
27: */
28: public interface FunctionE<T, R, E extends Exception> {
29:
30: /**
31: * Applies this function to the given argument.
32: *
33: * @param arg The input argument.
34: * @return The result of the function application.
35: */
36: R apply(T arg) throws E;
37: }