🎨 Replace NEWEST_FIRST comparator with Kotlin version
[Sone.git] / src / main / java / net / pterodactylus / sone / data / Post.java
index 9914185..d4d34e6 100644 (file)
@@ -19,8 +19,6 @@ package net.pterodactylus.sone.data;
 
 import static com.google.common.base.Optional.absent;
 
-import java.util.Comparator;
-
 import com.google.common.base.Optional;
 
 /**
@@ -29,16 +27,6 @@ import com.google.common.base.Optional;
  */
 public interface Post extends Identified {
 
-       /** Comparator for posts, sorts descending by time. */
-       public static final Comparator<Post> NEWEST_FIRST = new Comparator<Post>() {
-
-               @Override
-               public int compare(Post leftPost, Post rightPost) {
-                       return (int) Math.max(Integer.MIN_VALUE, Math.min(Integer.MAX_VALUE, rightPost.getTime() - leftPost.getTime()));
-               }
-
-       };
-
        //
        // ACCESSORS
        //