17 lines
433 B
Java
17 lines
433 B
Java
|
package org.warp.commonutils.functional;
|
||
|
|
||
|
public interface CancellableTriFunction<T, U, V, W> { //extends BiFunction<T, U, V> {
|
||
|
|
||
|
OperationResult<W> applyCancellable(T t, U u, V v);
|
||
|
|
||
|
/* default V apply(T t, U u) {
|
||
|
var result = applyCancellable(t, u);
|
||
|
if (result == OperationResult.CANCEL) {
|
||
|
throw new UnsupportedOperationException("Can't cancel this operation");
|
||
|
}
|
||
|
//noinspection unchecked
|
||
|
return (V) result;
|
||
|
}
|
||
|
*/
|
||
|
}
|