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

in.ashwanthkumar.utils.func.Functions Maven / Gradle / Ivy

There is a newer version: 0.1.0
Show newest version
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;
            }
        };
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy