Skip to content
This repository was archived by the owner on Mar 15, 2024. It is now read-only.

Commit f48b14a

Browse files
committed
Add ThrowableFunction.
1 parent a2ac3fa commit f48b14a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.badlogic.gdx.function;
2+
3+
/**
4+
* Version of {@link java.util.function.Function} which can throw an exception.
5+
*
6+
* @param <T> the type of parameter passed to this consumer
7+
* @param <R> the type of the function result
8+
* @param <E> the type of exception to be handled
9+
*/
10+
@FunctionalInterface
11+
public interface ThrowableFunction<T, R, E extends Throwable> {
12+
13+
R apply(T t) throws E;
14+
}

0 commit comments

Comments
 (0)