in.ashwanthkumar.utils.func.Functions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of my-java-utils Show documentation
Show all versions of my-java-utils Show documentation
My personal set of utils that I take along with my java projects.
package in.ashwanthkumar.utils.func;
public class Functions {
public static Function identity() {
return new Function() {
@Override
public T apply(T input) {
return input;
}
};
}
public static Function STDOUT() {
return new Function() {
@Override
public Void apply(T input) {
System.out.println(input);
return null;
}
};
}
public static Function STDERR() {
return new Function() {
@Override
public Void apply(T input) {
System.err.println(input);
return null;
}
};
}
}