com.ulisesbocchio.jasyptspringboot.util.Functional Maven / Gradle / Ivy
package com.ulisesbocchio.jasyptspringboot.util;
import java.util.Objects;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
public class Functional {
public static Function tap(Consumer consumer) {
return t -> {
consumer.accept(t);
return t;
};
}
public static Predicate notNull() {
return Objects::nonNull;
}
}