1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-25 21:42:07 +01:00

Add removeExtension methods to StanzaBuilder.

This commit is contained in:
Jonathan Lennox 2021-10-22 19:55:25 +00:00
parent 447c1304cf
commit 4ae3fbb073

View file

@ -184,6 +184,19 @@ public abstract class StanzaBuilder<B extends StanzaBuilder<B>> implements Stanz
return getThis();
}
public final B removeExtension(String elementName, String namespace) {
QName key = new QName(namespace, elementName);
extensionElements.remove(key);
return getThis();
}
public final B removeExtension(ExtensionElement extension) {
QName key = extension.getQName();
List<ExtensionElement> list = extensionElements.getAll(key);
list.remove(extension);
return getThis();
}
public abstract Stanza build();
public abstract B getThis();