1 package net.pterodactylus.sone.data
3 import java.util.Comparator.comparing
6 * Predicate that returns whether a post is _not_ from the future,
7 * i.e. whether it should be visible now.
9 @get:JvmName("noFuturePost")
10 val noFuturePost: (Post) -> Boolean = { it.time <= System.currentTimeMillis() }
13 * Comparator that orders posts by their time, newest posts first.
15 @get:JvmName("newestPostFirst")
16 val newestPostFirst: Comparator<Post> = comparing(Post::getTime).reversed()