mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-05 03:35:59 +01:00
Merge pull request #504 from JonathanLennox/StanzaBuilder-remove-extension
Add removeExtension methods to StanzaBuilder.
This commit is contained in:
commit
7fd300888e
1 changed files with 13 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue