Revert "Revert "[SEARCH-1445] Added ThrowingFunction utility class.""

This reverts commit 7037eb2
This commit is contained in:
eliaporciani
2019-03-27 21:43:02 +01:00
parent c857da306f
commit 2383f278c4
@@ -0,0 +1,35 @@
/*
* Copyright (C) 2005-2019 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.solr.utils;
/**
* @author elia
*
* Class used to use a lambda throwing a catched exceptino
*
* @param <T> the type of the input to the function
* @param <R> the type of the result of the function
*
*/
@FunctionalInterface
public interface ThrowingFunction<T, R, E extends Throwable> {
R apply(T t) throws E;
}