1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-01 16:32:08 +01:00

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

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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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; 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. * Check if a extension element with the given namespace exists.
* *