X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2Foutput%2Ftemplate%2FScope.java;fp=src%2Forg%2Fcacert%2Fgigi%2Foutput%2Ftemplate%2FScope.java;h=0000000000000000000000000000000000000000;hp=700ccfe7e9b717229869720ebc61f3eb387a5a41;hb=bccd4cc0dba0f89aa045b113bac46eb8cc1dab4e;hpb=c9ed09f0007fc2c813815be927a5a24b23dab83c diff --git a/src/org/cacert/gigi/output/template/Scope.java b/src/org/cacert/gigi/output/template/Scope.java deleted file mode 100644 index 700ccfe7..00000000 --- a/src/org/cacert/gigi/output/template/Scope.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.cacert.gigi.output.template; - -import java.io.PrintWriter; -import java.util.HashMap; -import java.util.Map; - -import org.cacert.gigi.localisation.Language; - -/** - * Builds a variable scope around another {@link Outputable}, statically filling - * variables. - */ -public class Scope implements Outputable { - - private Map vars; - - private Outputable out; - - /** - * Creates a new {@link Scope}. - * - * @param out - * the enclosed {@link Outputable}. - * @param vars - * the variables to assign in the inner scope. - */ - public Scope(Outputable out, Map vars) { - this.out = out; - this.vars = vars; - } - - @Override - public void output(PrintWriter out, Language l, Map vars) { - HashMap map = new HashMap<>(); - map.putAll(vars); - map.putAll(this.vars); - this.out.output(out, l, map); - } - -}