Return sets instead of collections for posts and replies.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 8 Sep 2014 16:59:44 +0000 (18:59 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 8 Sep 2014 17:05:27 +0000 (19:05 +0200)
src/main/java/net/pterodactylus/sone/core/ConfigurationSoneParser.java

index 3cb3b68..4f80e08 100644 (file)
@@ -1,6 +1,5 @@
 package net.pterodactylus.sone.core;
 
 package net.pterodactylus.sone.core;
 
-import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
 
 import java.util.HashSet;
 import java.util.Set;
 
@@ -72,7 +71,7 @@ public class ConfigurationSoneParser {
                                .getValue(defaultValue);
        }
 
                                .getValue(defaultValue);
        }
 
-       public Collection<Post> parsePosts(PostBuilderFactory postBuilderFactory)
+       public Set<Post> parsePosts(PostBuilderFactory postBuilderFactory)
        throws InvalidPostFound {
                Set<Post> posts = new HashSet<Post>();
                while (true) {
        throws InvalidPostFound {
                Set<Post> posts = new HashSet<Post>();
                while (true) {
@@ -109,7 +108,7 @@ public class ConfigurationSoneParser {
                return (postRecipientId != null) && (postRecipientId.length() == 43);
        }
 
                return (postRecipientId != null) && (postRecipientId.length() == 43);
        }
 
-       public Collection<PostReply> parsePostReplies(
+       public Set<PostReply> parsePostReplies(
                        PostReplyBuilderFactory postReplyBuilderFactory) {
                Set<PostReply> replies = new HashSet<PostReply>();
                while (true) {
                        PostReplyBuilderFactory postReplyBuilderFactory) {
                Set<PostReply> replies = new HashSet<PostReply>();
                while (true) {