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

io.alapierre.func.NullUtil Maven / Gradle / Ivy

There is a newer version: 1.17
Show newest version
package io.alapierre.func;

import java.util.function.Function;

/**
 * @author Adrian Lapierre {@literal [email protected]}
 * Copyrights by original author 2016.08.03
 */
public class NullUtil {

    private NullUtil() {
    }

    public static  R ifNotNull(T value, Function valueMapper) {
        if(value != null) return valueMapper.apply(value);
        return null;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy