X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FReply.java;h=4429abfbaeebcac8cd42ab6faaac50436d816058;hb=4623504d164c0f3cf870f1b5c5707fb058657e71;hp=c97d57b4143f9f8ffee613b888583b03bf6a7132;hpb=48d8d875299dcbcaf24912c58960b7a1c070d22b;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/data/Reply.java b/src/main/java/net/pterodactylus/sone/data/Reply.java index c97d57b..4429abf 100644 --- a/src/main/java/net/pterodactylus/sone/data/Reply.java +++ b/src/main/java/net/pterodactylus/sone/data/Reply.java @@ -45,6 +45,16 @@ public class Reply { /** * Creates a new reply. * + * @param id + * The ID of the reply + */ + public Reply(String id) { + this(id, null, null, 0, null); + } + + /** + * Creates a new reply. + * * @param sone * The sone that posted the reply * @param post @@ -200,7 +210,7 @@ public class Reply { */ @Override public int hashCode() { - return sone.hashCode() ^ id.hashCode() ^ post.hashCode() ^ (int) (time >> 32) ^ (int) (time & 0xffffffff) ^ text.hashCode(); + return id.hashCode(); } /** @@ -212,7 +222,7 @@ public class Reply { return false; } Reply reply = (Reply) object; - return reply.sone.equals(sone) && reply.id.equals(id) && reply.post.equals(post) && (reply.time == time) && reply.text.equals(text); + return reply.id.equals(id); } /**