- /**
- * Creates a new reply.
- *
- * @param post
- * The post to reply to
- * @param text
- * The text of the reply
- */
- public Reply(Post post, String text) {
- this(post, System.currentTimeMillis(), text);
- }
-
- /**
- * Creates a new reply-
- *
- * @param post
- * The post to reply to
- * @param time
- * The time of the reply
- * @param text
- * The text of the reply
- */
- public Reply(Post post, long time, String text) {
- this(UUID.randomUUID(), post, time, text);
- }
-
- /**
- * Creates a new reply-
- *
- * @param id
- * The ID of the reply
- * @param post
- * The post to reply to
- * @param time
- * The time of the reply
- * @param text
- * The text of the reply
- */
- public Reply(UUID id, Post post, long time, String text) {
- this.id = id;
- this.post = post;
- this.time = time;
- this.text = text;
- }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean apply(Reply<?> reply) {
+ return (reply == null) ? false : reply.getTime() <= System.currentTimeMillis();
+ }