From: David ‘Bombe’ Roden Date: Tue, 31 Jul 2012 09:10:41 +0000 (+0200) Subject: Add filter that can remove single elements from collections. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=fb73cc41eb8f9ef9bf2181f4295dc74581b25b53;p=demoscenemusic.git Add filter that can remove single elements from collections. --- diff --git a/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java b/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java index 0eb9e3e..cfc3fdb 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java @@ -60,6 +60,7 @@ import net.pterodactylus.util.template.CollectionSortFilter; import net.pterodactylus.util.template.HtmlFilter; import net.pterodactylus.util.template.MatchFilter; import net.pterodactylus.util.template.ReflectionAccessor; +import net.pterodactylus.util.template.RemoveFilter; import net.pterodactylus.util.template.Template; import net.pterodactylus.util.template.TemplateContextFactory; import net.pterodactylus.util.template.TemplateParser; @@ -129,6 +130,7 @@ public class TemplateServlet extends HttpServlet { templateContextFactory.addFilter("matches", new MatchFilter()); templateContextFactory.addFilter("time", new DurationFilter()); templateContextFactory.addFilter("concise", new ConciseNumberFilter()); + templateContextFactory.addFilter("remove", new RemoveFilter()); templateContextFactory.addTemplateObject("core", core); templateContextFactory.addTemplateObject("dataManager", core.getDataManager());