From 891423fd6d7291c6d19a1aad645278eff6f1f1d5 Mon Sep 17 00:00:00 2001 From: delvh Date: Sun, 2 Feb 2020 14:20:11 +0100 Subject: [PATCH] Added toString method for Message- and UserstatusChangeEvents --- src/main/java/envoy/event/MessageStatusChangeEvent.java | 5 +++++ src/main/java/envoy/event/UserStatusChangeEvent.java | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/main/java/envoy/event/MessageStatusChangeEvent.java b/src/main/java/envoy/event/MessageStatusChangeEvent.java index c56f7a0..7f36b9c 100644 --- a/src/main/java/envoy/event/MessageStatusChangeEvent.java +++ b/src/main/java/envoy/event/MessageStatusChangeEvent.java @@ -61,4 +61,9 @@ public class MessageStatusChangeEvent implements Event { * @since Envoy Common v0.2-alpha */ public Date getDate() { return date; } + + @Override + public String toString() { + return String.format("MessageStatusChangeEvent[message id=%d, to status=%s, at %s]", id, status.toString(), date.toString()); + } } diff --git a/src/main/java/envoy/event/UserStatusChangeEvent.java b/src/main/java/envoy/event/UserStatusChangeEvent.java index 923282e..4a856c4 100644 --- a/src/main/java/envoy/event/UserStatusChangeEvent.java +++ b/src/main/java/envoy/event/UserStatusChangeEvent.java @@ -51,4 +51,7 @@ public class UserStatusChangeEvent implements Event { * @since Envoy Common v0.2-alpha */ public long getId() { return id; } + + @Override + public String toString() { return String.format("UserStatusChangeEvent[user with id=%d, to status=%s]", id, status.toString()); } }