package net.pterodactylus.sone.notify;
+import java.util.function.Predicate;
+
import static com.google.common.base.Preconditions.checkNotNull;
import javax.annotation.Nonnull;
import net.pterodactylus.sone.freenet.wot.Trust;
import net.pterodactylus.util.notify.Notification;
-import com.google.common.base.Predicate;
-
/**
* Filters {@link Notification}s involving {@link Post}s.
*/
@Nonnull
public Predicate<Post> isVisible(@Nullable final Sone currentSone) {
- return new Predicate<Post>() {
- @Override
- public boolean apply(@Nullable Post post) {
- return (post != null) && isPostVisible(currentSone, post);
- }
- };
+ return post -> (post != null) && isPostVisible(currentSone, post);
}
}