/*
 * @author Ranides Atterwim <ranides@gmail.com>
 * @copyright Ranides Atterwim
 * @license WTFPL
 * @url http://ranides.net/projects/assira
 */

package net.ranides.assira.functional;

import net.ranides.assira.trace.ExceptionUtils;

/**
 *
 * @author Ranides Atterwim <ranides@gmail.com>
 */
public interface CheckedSupplier<T,E extends Exception> {

    T get() throws E;
    
    default T $get() {
        try {
            return get();
        } catch(Exception cause) {
            throw ExceptionUtils.rethrow(cause);
        }
    }
    
}
