
com.linkedin.parseq.function.Function1 Maven / Gradle / Ivy
package com.linkedin.parseq.function;
import java.util.Objects;
@FunctionalInterface
public interface Function1 {
R apply(T1 t1) throws Exception;
default Function1 andThen(Function1 super R, ? extends V> f) {
Objects.requireNonNull(f);
return (T1 t1) -> f.apply(apply(t1));
}
/**
* Returns a function that always returns its input argument.
*
* @param the type of the input and output objects to the function
* @return a function that always returns its input argument
*/
static Function1 identity() {
return t -> t;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy