diff options
author | pabs@pablotron.org <pabs@pablotron.org> | 2014-12-18 16:45:35 -0500 |
---|---|---|
committer | pabs@pablotron.org <pabs@pablotron.org> | 2014-12-18 16:45:35 -0500 |
commit | b3bccd2512821653904372e5f995e9bb8f591ed5 (patch) | |
tree | d534973f6427d944d1087c3435c313860817d75e | |
parent | 5e3358175b5026de5a7473988cbe9c2db9306e00 (diff) | |
download | luigi-template-b3bccd2512821653904372e5f995e9bb8f591ed5.tar.bz2 luigi-template-b3bccd2512821653904372e5f995e9bb8f591ed5.zip |
add comments
-rw-r--r-- | java/pablotron/luigi/Test.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/java/pablotron/luigi/Test.java b/java/pablotron/luigi/Test.java index 1814a95..7163c52 100644 --- a/java/pablotron/luigi/Test.java +++ b/java/pablotron/luigi/Test.java @@ -2,6 +2,7 @@ package pablotron.luigi; import java.util.Map; import java.util.HashMap; + import pablotron.luigi.LuigiError; import pablotron.luigi.Filter; import pablotron.luigi.Template; @@ -27,12 +28,14 @@ public final class Test { // custom filters private static final Map<String, Filter.Handler> filters = new HashMap<String, Filter.Handler>() {{ + // add custom filter put("custom", new Filter.Handler() { public String filter(String val, String args[], Map<String, String> row) { return "custom"; } }); + // add custom filter with argument put("custom_with_arg", new Filter.Handler() { public String filter(String val, String args[], Map<String, String> row) { return (args.length > 0) ? args[0] : "custom"; @@ -40,7 +43,7 @@ public final class Test { }); }}; - public static void main(String cli_args[]) throws Exception { + public static void main(String params[]) throws Exception { // add custom filters Filter.FILTERS.putAll(filters); |