X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FPost.java;h=21ba42d353dc310a8c1fcde490d9bcf20c97b4d5;hp=654b8279e257b34b37c456d16ef14c6a1cc9f87b;hb=4316b669b28d294dd2b4b9a34e45f080c77037fe;hpb=ca0d5c61afd7696042e4a5203053f9bac52d26b6 diff --git a/src/main/java/net/pterodactylus/sone/data/Post.java b/src/main/java/net/pterodactylus/sone/data/Post.java index 654b827..21ba42d 100644 --- a/src/main/java/net/pterodactylus/sone/data/Post.java +++ b/src/main/java/net/pterodactylus/sone/data/Post.java @@ -44,6 +44,9 @@ public class Post { /** The Sone this post belongs to. */ private volatile Sone sone; + /** The Sone of the recipient. */ + private volatile Sone recipient; + /** The time of the post (in milliseconds since Jan 1, 1970 UTC). */ private volatile long time; @@ -140,6 +143,27 @@ public class Post { } /** + * Returns the recipient of this post, if any. + * + * @return The recipient of this post, or {@code null} + */ + public Sone getRecipient() { + return recipient; + } + + /** + * Sets the recipient of this post. + * + * @param recipient + * The recipient of this post, or {@code null} + * @return This post (for method chaining) + */ + public Post setRecipient(Sone recipient) { + this.recipient = recipient; + return this; + } + + /** * Returns the time of the post. * * @return The time of the post (in milliseconds since Jan 1, 1970 UTC)