All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.rx.util.function.Func Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package org.rx.util.function;

import lombok.SneakyThrows;

import java.util.concurrent.Callable;
import java.util.function.Supplier;

@FunctionalInterface
public interface Func extends Callable, Supplier {
    Func EMPTY = () -> null;

    T invoke() throws Throwable;

    @SneakyThrows
    @Override
    default T call() throws Exception {
        return invoke();
    }

    @SneakyThrows
    @Override
    default T get() {
        return invoke();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy