/*
- * Sone - UniqueElementFilter.java - Copyright © 2011–2012 David Roden
+ * Sone - UniqueElementFilter.java - Copyright © 2011–2019 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* Filter that reduces a collection to a {@link Set}, removing duplicates.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
public class UniqueElementFilter implements Filter {
* {@inheritDoc}
*/
@Override
- public Object format(TemplateContext templateContext, Object data, Map<String, String> parameters) {
+ public Object format(TemplateContext templateContext, Object data, Map<String, Object> parameters) {
if (!(data instanceof Collection<?>)) {
return data;
}
- return new HashSet<Object>((Collection<?>) data);
+ return new HashSet<>((Collection<?>) data);
}
}