ThrowFunction
This commit is contained in:
30
src/main/java/org/redkale/util/ThrowFunction.java
Normal file
30
src/main/java/org/redkale/util/ThrowFunction.java
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.redkale.util;
|
||||||
|
|
||||||
|
import org.redkale.annotation.ClassDepends;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抛异常版的Function
|
||||||
|
*
|
||||||
|
* <p>详情见: https://redkale.org
|
||||||
|
*
|
||||||
|
* @author zhangjx
|
||||||
|
* @param <T> 泛型
|
||||||
|
* @param <R> 泛型
|
||||||
|
* @since 2.8.0
|
||||||
|
*/
|
||||||
|
@ClassDepends
|
||||||
|
@FunctionalInterface
|
||||||
|
public interface ThrowFunction<T, R> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a result.
|
||||||
|
*
|
||||||
|
* @param t T
|
||||||
|
* @return r R
|
||||||
|
* @throws java.lang.Throwable Throwable
|
||||||
|
*/
|
||||||
|
R apply(T t) throws Throwable;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user