Add Message#hasAttachment convenience method

This commit is contained in:
Kai S. K. Engelbart 2020-07-02 14:34:32 +02:00
parent 5b568e8c43
commit 0f1bce87e0
1 changed files with 6 additions and 0 deletions

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