X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FReply.java;h=be60b88f3b549d413100db65d53f4e210ca39896;hb=0acd68634f3e73c62087609c1faa2dfc53da506d;hp=780fe692ecc0b94cd4c697b76a322a6fcec2ea53;hpb=43a21f859e9fec31096c1540148bdd44a8e3702f;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/data/Reply.java b/src/main/java/net/pterodactylus/sone/data/Reply.java index 780fe69..be60b88 100644 --- a/src/main/java/net/pterodactylus/sone/data/Reply.java +++ b/src/main/java/net/pterodactylus/sone/data/Reply.java @@ -1,5 +1,5 @@ /* - * Sone - Reply.java - Copyright © 2011 David Roden + * Sone - Reply.java - Copyright © 2011–2012 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 @@ -20,7 +20,7 @@ package net.pterodactylus.sone.data; import java.util.Comparator; import java.util.UUID; -import net.pterodactylus.util.filter.Filter; +import net.pterodactylus.util.collection.filter.Filter; /** * Abstract base class for all replies. @@ -69,6 +69,9 @@ public abstract class Reply> { /** The text of the reply. */ private volatile String text; + /** Whether the reply is known. */ + private volatile boolean known; + /** * Creates a new reply with the given ID. * @@ -187,6 +190,28 @@ public abstract class Reply> { return (T) this; } + /** + * Returns whether this reply is known. + * + * @return {@code true} if this reply is known, {@code false} otherwise + */ + public boolean isKnown() { + return known; + } + + /** + * Sets whether this reply is known. + * + * @param known + * {@code true} if this reply is known, {@code false} otherwise + * @return This reply + */ + @SuppressWarnings("unchecked") + public T setKnown(boolean known) { + this.known = known; + return (T) this; + } + // // OBJECT METHODS //