package net.pterodactylus.sone.data;
import java.util.Comparator;
+import java.util.List;
import com.google.common.base.Optional;
import com.google.common.base.Predicate;
*/
public Post setKnown(boolean known);
+ List<PostReply> getReplies();
+
}
package net.pterodactylus.sone.data.impl;
+import static com.google.common.collect.FluentIterable.from;
+
+import java.util.List;
import java.util.UUID;
import net.pterodactylus.sone.data.Post;
+import net.pterodactylus.sone.data.PostReply;
+import net.pterodactylus.sone.data.Reply;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.sone.database.Database;
return this;
}
+ @Override
+ public List<PostReply> getReplies() {
+ return from(database.getReplies(getId())).toSortedList(Reply.TIME_COMPARATOR);
+ }
+
//
// OBJECT METHODS
//