import java.util.logging.Logger;
import net.pterodactylus.sone.data.Post;
+import net.pterodactylus.sone.data.PostReply;
import net.pterodactylus.sone.data.Profile;
import net.pterodactylus.sone.data.Profile.Field;
import net.pterodactylus.sone.data.Reply;
/** Short-term cache. */
private final Cache<List<Phrase>, Set<Hit<Post>>> hitCache = new MemoryCache<List<Phrase>, Set<Hit<Post>>>(new ValueRetriever<List<Phrase>, Set<Hit<Post>>>() {
+ @Override
@SuppressWarnings("synthetic-access")
public CacheItem<Set<Hit<Post>>> retrieve(List<Phrase> phrases) throws CacheException {
Set<Post> posts = new HashSet<Post>();
if (post.getRecipient() != null) {
postString.append(' ').append(SoneStringGenerator.NAME_GENERATOR.generateString(post.getRecipient()));
}
- for (Reply reply : Filters.filteredList(webInterface.getCore().getReplies(post), Reply.FUTURE_REPLIES_FILTER)) {
+ for (PostReply reply : Filters.filteredList(webInterface.getCore().getReplies(post), Reply.FUTURE_REPLY_FILTER)) {
postString.append(' ').append(SoneStringGenerator.NAME_GENERATOR.generateString(reply.getSone()));
postString.append(' ').append(reply.getText());
}
if (!(object instanceof Phrase)) {
return false;
}
- @SuppressWarnings("hiding")
Phrase phrase = (Phrase) object;
return (this.optionality == phrase.optionality) && this.phrase.equals(phrase.phrase);
}