X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FReply.java;fp=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FReply.java;h=0cf2a52c5144f18e7be7aa459f3729d7fcf50b8f;hp=120575eadd2cd92f25cab1f86865ff9ab7622cb1;hb=5c5bee980f9cab5792e34d1c9840f73b8b191830;hpb=faf66247a34f64946990a985d2ea3003465969cb diff --git a/src/main/java/net/pterodactylus/sone/data/Reply.java b/src/main/java/net/pterodactylus/sone/data/Reply.java index 120575e..0cf2a52 100644 --- a/src/main/java/net/pterodactylus/sone/data/Reply.java +++ b/src/main/java/net/pterodactylus/sone/data/Reply.java @@ -17,10 +17,6 @@ package net.pterodactylus.sone.data; -import java.util.Comparator; - -import com.google.common.base.Predicate; - /** * Defines methods common for all replies. * @@ -29,32 +25,6 @@ import com.google.common.base.Predicate; */ public interface Reply> extends Identified { - /** Comparator that sorts replies ascending by time. */ - public static final Comparator> TIME_COMPARATOR = new Comparator>() { - - /** - * {@inheritDoc} - */ - @Override - public int compare(Reply leftReply, Reply rightReply) { - return (int) Math.max(Integer.MIN_VALUE, Math.min(Integer.MAX_VALUE, leftReply.getTime() - rightReply.getTime())); - } - - }; - - /** Filter for replies with timestamps from the future. */ - public static final Predicate> FUTURE_REPLY_FILTER = new Predicate>() { - - /** - * {@inheritDoc} - */ - @Override - public boolean apply(Reply reply) { - return (reply != null) && (reply.getTime() <= System.currentTimeMillis()); - } - - }; - /** * Returns the ID of the reply. * @@ -90,13 +60,4 @@ public interface Reply> extends Identified { */ public boolean isKnown(); - /** - * Sets whether this reply is known. - * - * @param known - * {@code true} if this reply is known, {@code false} otherwise - * @return This reply - */ - public T setKnown(boolean known); - }