X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FReply.java;h=2dacfbee93b4085dcd42f2400fc5fc9ea22d8ccd;hp=a1063917692196b98ae1c5ea879b445a700c2b19;hb=73be50df4f7b7761fe7f286f2fdb73a142c14926;hpb=5777cb6291375cdd4cbc2c781d1fea807da566f8 diff --git a/src/main/java/net/pterodactylus/sone/data/Reply.java b/src/main/java/net/pterodactylus/sone/data/Reply.java index a106391..2dacfbe 100644 --- a/src/main/java/net/pterodactylus/sone/data/Reply.java +++ b/src/main/java/net/pterodactylus/sone/data/Reply.java @@ -20,6 +20,8 @@ package net.pterodactylus.sone.data; import java.util.Comparator; import java.util.UUID; +import net.pterodactylus.util.filter.Filter; + /** * A reply is like a {@link Post} but can never be posted on its own, it always * refers to another {@link Post}. @@ -38,6 +40,16 @@ public class Reply { }; + /** Filter for replies with timestamps from the future. */ + public static final Filter FUTURE_REPLIES_FILTER = new Filter() { + + @Override + public boolean filterObject(Reply reply) { + return reply.getTime() <= System.currentTimeMillis(); + } + + }; + /** The ID of the reply. */ private final UUID id;