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

com.moon.core.util.function.NullableFunction Maven / Gradle / Ivy

package com.moon.core.util.function;

import java.util.function.Function;

/**
 * @author moonsky
 */
@FunctionalInterface
public interface NullableFunction extends Function {

    /**
     * Applies this function to the given argument.
     *
     * @param t the function argument
     * @return the function result
     */
    R nullable(T t);

    /**
     * Applies this function to the given argument.
     *
     * @param t the function argument
     * @return the function result
     */
    @Override
    default R apply(T t) { return nullable(t); }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy