Add StanzaView.hasExtension(Class<? extends ExtensionElement>)

This commit is contained in:
Florian Schmaus 2020-04-05 19:59:24 +02:00
parent 5380e5705f
commit 8d432e2303
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
/**
*
* Copyright 2019 Florian Schmaus
* Copyright 2019-2020 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -67,6 +67,10 @@ public interface StanzaView extends XmlLangElement {
return getExtension(qname) != null;
}
default boolean hasExtension(Class<? extends ExtensionElement> extensionElementClass) {
return getExtension(extensionElementClass) != null;
}
/**
* Check if a extension element with the given namespace exists.
*