X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.java;h=c3287c8835a476e97bb112e746a7b1bc3e0796e0;hp=63cdbcb81c8b10098e0655241f25eb3b91a07909;hb=a47643aed43d118ca68044f95451bb5374cdb332;hpb=4314a29fdeb9766e198b7144a9724422d0df84dc diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 63cdbcb..c3287c8 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -1,5 +1,5 @@ /* - * Sone - Sone.java - Copyright © 2010 David Roden + * Sone - Sone.java - Copyright © 2010–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 @@ -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