diff options
author | 2017-05-23 14:47:38 +0300 | |
---|---|---|
committer | 2017-05-23 15:50:32 +0300 | |
commit | be30d843aab467aa628f1c3f3c7d194bfda54284 (patch) | |
tree | 4185a4e0c084aa1a0e0072af5153fd895edf440c /juick-www/src/main/java/com/mitchellbosecke/pebble/extension/filters/TagsListFilter.java | |
parent | 4c6f3ba0d539f63a83c18e20ed4219bdef849b81 (diff) |
fix style
Diffstat (limited to 'juick-www/src/main/java/com/mitchellbosecke/pebble/extension/filters/TagsListFilter.java')
-rw-r--r-- | juick-www/src/main/java/com/mitchellbosecke/pebble/extension/filters/TagsListFilter.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/juick-www/src/main/java/com/mitchellbosecke/pebble/extension/filters/TagsListFilter.java b/juick-www/src/main/java/com/mitchellbosecke/pebble/extension/filters/TagsListFilter.java new file mode 100644 index 00000000..55c98307 --- /dev/null +++ b/juick-www/src/main/java/com/mitchellbosecke/pebble/extension/filters/TagsListFilter.java @@ -0,0 +1,23 @@ +package com.mitchellbosecke.pebble.extension.filters; + +import com.juick.Tag; +import com.mitchellbosecke.pebble.extension.Filter; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Created by vitalyster on 23.05.2017. + */ +public class TagsListFilter implements Filter { + @Override + public Object apply(Object input, Map<String, Object> args) { + return ((List<Tag>) input).stream().map(Tag::getName).collect(Collectors.toList()); + } + + @Override + public List<String> getArgumentNames() { + return null; + } +} |