diff options
author | Paul Duncan <pabs@pablotron.org> | 2018-09-06 08:40:23 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2018-09-06 08:40:23 -0400 |
commit | f422534cd4cf1ba32523c9fc798c207065038ca5 (patch) | |
tree | d3dce87dffeca2acfceab6aa9abf7046843f9145 /java/pablotron/luigi/Template.java | |
parent | c02640d395fe95a41183a63bea29113676e92fae (diff) | |
download | luigi-template-f422534cd4cf1ba32523c9fc798c207065038ca5.tar.bz2 luigi-template-f422534cd4cf1ba32523c9fc798c207065038ca5.zip |
java: add pom.xml, mv sources to src/main/java/org/pablotron, add src/test, add initial junit tests, update makefile and .gitignore
Diffstat (limited to 'java/pablotron/luigi/Template.java')
-rw-r--r-- | java/pablotron/luigi/Template.java | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/java/pablotron/luigi/Template.java b/java/pablotron/luigi/Template.java deleted file mode 100644 index 8ab1d77..0000000 --- a/java/pablotron/luigi/Template.java +++ /dev/null @@ -1,37 +0,0 @@ -package pablotron.luigi; - -import java.util.Map; -import pablotron.luigi.Parser; -import pablotron.luigi.Filter; -import pablotron.luigi.LuigiError; -import pablotron.luigi.actions.Action; - -public final class Template { - private static final String VERSION = "0.4.0"; - - private final String template; - private final Action actions[]; - private final Map<String, Filter.Handler> filters; - - public Template( - final String template, - final Map<String, Filter.Handler> filters - ) throws LuigiError { - this.template = template; - this.filters = filters; - this.actions = Parser.parse_template(template); - } - - public Template(final String template) throws LuigiError { - this(template, Filter.FILTERS); - } - - public String run(final Map<String, String> args) throws LuigiError { - final StringBuilder r = new StringBuilder(); - - for (Action a: this.actions) - r.append(a.run(this.filters, args)); - - return r.toString(); - } -}; |