package org.warp.commonutils.functional; public interface CancellableFunction { //extends Function { OperationResult applyCancellable(T t); /*default U apply(T t) { var result = applyCancellable(t); if (result == OperationResult.CANCEL) { throw new UnsupportedOperationException("Can't cancel this operation"); } //noinspection unchecked return (U) result; }*/ }