Add Message#hasAttachment convenience method

This commit is contained in:
Kai S. K. Engelbart 2020-07-02 14:34:32 +02:00
parent 34ed3df862
commit 462be65c46
No known key found for this signature in database
GPG Key ID: 0A48559CA32CB48F

View File

@ -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