X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.java;h=c2f9ae19585251698f0e2964afaa2700a0f4820d;hp=63cdbcb81c8b10098e0655241f25eb3b91a07909;hb=c3240e5c85d0cd49e346939f864cf93fa36daed0;hpb=7b1a3e4378a632ad4b9e32373921cfad4fd91e8d diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 63cdbcb..c2f9ae1 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -200,6 +200,9 @@ public class Sone implements Fingerprintable, Comparable { /** The client used by the Sone. */ private volatile Client client; + /** Whether this Sone is known. */ + private volatile boolean known; + /** All friend Sones. */ private final Set friendSones = new CopyOnWriteArraySet(); @@ -451,6 +454,27 @@ public class Sone implements Fingerprintable, Comparable { } /** + * Returns whether this Sone is known. + * + * @return {@code true} if this Sone is known, {@code false} otherwise + */ + public boolean isKnown() { + return known; + } + + /** + * Sets whether this Sone is known. + * + * @param known + * {@code true} if this Sone is known, {@code false} otherwise + * @return This Sone + */ + public Sone setKnown(boolean known) { + this.known = known; + return this; + } + + /** * Returns all friend Sones of this Sone. * * @return The friend Sones of this Sone