/** * * Copyright 2015-2019 Florian Schmaus. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jivesoftware.smack.packet; import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import javax.xml.namespace.QName; import org.jivesoftware.smack.util.MultiMap; import org.jivesoftware.smack.util.Objects; import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smack.util.XmlStringBuilder; /** * An {@link ExtensionElement} modeling the often required and used XML features when using XMPP. It * is therefore suitable for most use cases. Use * {@link StandardExtensionElement#builder(String, String)} to build these elements. *
* Note the this is only meant as catch-all if no particular extension element provider is * registered. Protocol implementations should prefer to model their own extension elements tailored * to their use cases. *
* * @since 4.2 * @author Florian Schmaus */ public final class StandardExtensionElement implements ExtensionElement { private final String name; private final String namespace; private final Map* This is meant to construct extension elements used as simple flags in Stanzas. *
*
* @param name the name of the extension element.
* @param namespace the namespace of the extension element.
*/
public StandardExtensionElement(String name, String namespace) {
this(name, namespace, null, null, null);
}
private StandardExtensionElement(String name, String namespace, Map