projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Store the Sone in the reply.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
data
/
Reply.java
diff --git
a/src/main/java/net/pterodactylus/sone/data/Reply.java
b/src/main/java/net/pterodactylus/sone/data/Reply.java
index
62aadea
..
cfc6d91
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/data/Reply.java
+++ b/
src/main/java/net/pterodactylus/sone/data/Reply.java
@@
-27,6
+27,9
@@
import java.util.UUID;
*/
public class Reply {
*/
public class Reply {
+ /** The Sone that posted this reply. */
+ private final Sone sone;
+
/** The ID of the reply. */
private final UUID id;
/** The ID of the reply. */
private final UUID id;
@@
-42,18
+45,22
@@
public class Reply {
/**
* Creates a new reply.
*
/**
* Creates a new reply.
*
+ * @param sone
+ * The sone that posted the reply
* @param post
* The post to reply to
* @param text
* The text of the reply
*/
* @param post
* The post to reply to
* @param text
* The text of the reply
*/
- public Reply(Post post, String text) {
- this(post, System.currentTimeMillis(), text);
+ public Reply(
Sone sone,
Post post, String text) {
+ this(
sone,
post, System.currentTimeMillis(), text);
}
/**
* Creates a new reply-
*
}
/**
* Creates a new reply-
*
+ * @param sone
+ * The sone that posted the reply
* @param post
* The post to reply to
* @param time
* @param post
* The post to reply to
* @param time
@@
-61,13
+68,15
@@
public class Reply {
* @param text
* The text of the reply
*/
* @param text
* The text of the reply
*/
- public Reply(Post post, long time, String text) {
- this(UUID.randomUUID(), post, time, text);
+ public Reply(
Sone sone,
Post post, long time, String text) {
+ this(
sone,
UUID.randomUUID(), post, time, text);
}
/**
* Creates a new reply-
*
}
/**
* Creates a new reply-
*
+ * @param sone
+ * The sone that posted the reply
* @param id
* The ID of the reply
* @param post
* @param id
* The ID of the reply
* @param post
@@
-77,7
+86,8
@@
public class Reply {
* @param text
* The text of the reply
*/
* @param text
* The text of the reply
*/
- public Reply(UUID id, Post post, long time, String text) {
+ public Reply(Sone sone, UUID id, Post post, long time, String text) {
+ this.sone = sone;
this.id = id;
this.post = post;
this.time = time;
this.id = id;
this.post = post;
this.time = time;
@@
-89,6
+99,15
@@
public class Reply {
//
/**
//
/**
+ * Returns the Sone that posted this reply.
+ *
+ * @return The Sone that posted this reply
+ */
+ public Sone getSone() {
+ return sone;
+ }
+
+ /**
* Returns the ID of the reply.
*
* @return The ID of the reply
* Returns the ID of the reply.
*
* @return The ID of the reply