-
Create the source directory and class file
$ mkdir -p upper/functions $ cd upper $ touch ./functions/Upper.java
-
Write the function class
Add the Function implementation
function/Upper.javapackage functions; import java.util.function.Function; public class Upper implements Function<String, String> { public String apply(String name) { return name.toUpperCase(); } }
-
Build and package the function
$ mkdir -p bin $ javac -source 1.8 -target 1.8 -d bin ./functions/Upper.java $ jar cvf upper.jar -C bin functions/Upper.class
Last active
March 23, 2018 17:23
-
-
Save trisberg/e113d1ccc15859fba13b3796cec69062 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment