🎨 Replace reply comparator with Kotlin version
[Sone.git] / src / main / java / net / pterodactylus / sone / data / Reply.java
index d3068c4..705b1e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - Reply.java - Copyright Â© 2010–2016 David Roden
+ * Sone - Reply.java - Copyright Â© 2010–2020 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -26,23 +26,9 @@ import com.google.common.base.Predicate;
  *
  * @param <T>
  *            The type of the reply
- * @author <a href="mailto:bombe@pterodactylus.net">David â€˜Bombe’ Roden</a>
  */
 public interface Reply<T extends Reply<T>> extends Identified {
 
-       /** Comparator that sorts replies ascending by time. */
-       public static final Comparator<? super Reply<?>> TIME_COMPARATOR = new Comparator<Reply<?>>() {
-
-               /**
-                * {@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<Reply<?>> FUTURE_REPLY_FILTER = new Predicate<Reply<?>>() {