package net.pterodactylus.sone.data;
+import java.util.Collections;
import java.util.Comparator;
+import java.util.List;
+import java.util.Set;
+import com.google.common.base.Function;
import com.google.common.base.Optional;
import com.google.common.base.Predicate;
};
+ public static final Function<Post, List<PostReply>> TO_REPLIES = new Function<Post, List<PostReply>>() {
+ @Override
+ public List<PostReply> apply(Post post) {
+ return (post == null) ? Collections.<PostReply>emptyList() : post.getReplies();
+ }
+ };
+
//
// ACCESSORS
//
/**
* Sets whether this post is known.
*
- * @param known
- * {@code true} if this post is known, {@code false} otherwise
* @return This post
*/
- public Post setKnown(boolean known);
+ public Post setKnown();
+
+ void like(Sone localSone);
+ void unlike(Sone localSone);
+
+ boolean isLiked(Sone sone);
+ Set<Sone> getLikes();
+
+ List<PostReply> getReplies();
}