projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🎨 Replace Plugin containers with Kotlin versions
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
template
/
UniqueElementFilter.java
diff --git
a/src/main/java/net/pterodactylus/sone/template/UniqueElementFilter.java
b/src/main/java/net/pterodactylus/sone/template/UniqueElementFilter.java
index
70dae70
..
6fb584e
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/template/UniqueElementFilter.java
+++ b/
src/main/java/net/pterodactylus/sone/template/UniqueElementFilter.java
@@
-1,5
+1,5
@@
/*
/*
- * Sone - UniqueElementFilter.java - Copyright © 2011 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
*
* 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
@@
-27,8
+27,6
@@
import net.pterodactylus.util.template.TemplateContext;
/**
* Filter that reduces a collection to a {@link Set}, removing duplicates.
/**
* 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 {
*/
public class UniqueElementFilter implements Filter {
@@
-36,11
+34,11
@@
public class UniqueElementFilter implements Filter {
* {@inheritDoc}
*/
@Override
* {@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;
}
if (!(data instanceof Collection<?>)) {
return data;
}
- return new HashSet<
Object
>((Collection<?>) data);
+ return new HashSet<>((Collection<?>) data);
}
}
}
}