X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FPost.java;h=456b205e67f783cdae1a9e9f40613f9fb5cc1f79;hb=dcf921e95da3881c75f57323733273c96027822e;hp=3c02a1c55462c9b64efcb3309b1c8f0dd5548628;hpb=1127a71127c6488152e5cbe3b8c6d941eaf14e83;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/data/Post.java b/src/main/java/net/pterodactylus/sone/data/Post.java index 3c02a1c..456b205 100644 --- a/src/main/java/net/pterodactylus/sone/data/Post.java +++ b/src/main/java/net/pterodactylus/sone/data/Post.java @@ -25,6 +25,9 @@ package net.pterodactylus.sone.data; */ public class Post { + /** The Sone this post belongs to. */ + private final Sone sone; + /** The time of the post (in milliseconds since Jan 1, 1970 UTC). */ private final long time; @@ -34,17 +37,29 @@ public class Post { /** * Creates a new post. * + * @param sone + * The Sone this post belongs to * @param time * The time of the post (in milliseconds since Jan 1, 1970 UTC) * @param text * The text of the post */ - public Post(long time, String text) { + public Post(Sone sone, long time, String text) { + this.sone = sone; this.time = time; this.text = text; } /** + * Returns the Sone this post belongs to. + * + * @return The Sone of this post + */ + public Sone getSone() { + return sone; + } + + /** * Returns the time of the post. * * @return The time of the post (in milliseconds since Jan 1, 1970 UTC)