import freenet.keys.FreenetURI;
+import com.google.common.collect.FluentIterable;
import com.google.common.hash.Hasher;
import com.google.common.hash.Hashing;
* @return All posts of this Sone
*/
public List<Post> getPosts() {
- List<Post> sortedPosts;
synchronized (this) {
- sortedPosts = new ArrayList<Post>(posts);
+ return FluentIterable.from(posts).toSortedList(Post.TIME_COMPARATOR);
}
- Collections.sort(sortedPosts, Post.TIME_COMPARATOR);
- return sortedPosts;
}
/**