From 462be65c46dac38dbd43606f6b1026886a3783e8 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Thu, 2 Jul 2020 14:34:32 +0200 Subject: [PATCH] Add Message#hasAttachment convenience method --- src/main/java/envoy/data/Message.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/envoy/data/Message.java b/src/main/java/envoy/data/Message.java index 54b405e..ba0a756 100644 --- a/src/main/java/envoy/data/Message.java +++ b/src/main/java/envoy/data/Message.java @@ -179,6 +179,12 @@ public class Message implements Serializable { */ public Attachment getAttachment() { return attachment; } + /** + * @return {@code true} if an attachment is present + * @since Envoy Common v0.1-beta + */ + public boolean hasAttachment() { return attachment != null; } + /** * @return the current status of this message * @since Envoy Common v0.2-alpha