mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +01:00
Add removeExtension methods to StanzaBuilder.
This commit is contained in:
parent
447c1304cf
commit
4ae3fbb073
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();
|
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 Stanza build();
|
||||||
|
|
||||||
public abstract B getThis();
|
public abstract B getThis();
|
||||||
|
|
Loading…
Reference in a new issue