From: David ‘Bombe’ Roden Date: Sun, 14 Nov 2010 11:00:37 +0000 (+0100) Subject: Store client information in Sone. X-Git-Tag: 0.3-RC1~94 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=34f87eac013c2a6c29101af7e4654bd91fcd1df8 Store client information in Sone. --- diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index a0f87b2..7d4f7ef 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -81,6 +81,9 @@ public class Sone { /** The profile of this Sone. */ private volatile Profile profile = new Profile(); + /** The client used by the Sone. */ + private volatile Client client; + /** All friend Sones. */ private final Set friendSones = Collections.synchronizedSet(new HashSet()); @@ -281,6 +284,27 @@ public class Sone { } /** + * Returns the client used by this Sone. + * + * @return The client used by this Sone, or {@code null} + */ + public Client getClient() { + return client; + } + + /** + * Sets the client used by this Sone. + * + * @param client + * The client used by this Sone, or {@code null} + * @return This Sone (for method chaining) + */ + public Sone setClient(Client client) { + this.client = client; + return this; + } + + /** * Returns all friend Sones of this Sone. * * @return The friend Sones of this Sone