* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.netconf.api.xml;
import com.google.common.base.Optional;
import com.google.common.base.Strings;
import com.google.common.collect.Collections2;
import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
import java.io.IOException;
+import java.util.AbstractMap.SimpleImmutableEntry;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
public Map<String, Attr> getAttributes() {
- Map<String, Attr> mappedAttributes = Maps.newHashMap();
+ Map<String, Attr> mappedAttributes = new HashMap<>();
NamedNodeMap attributes = element.getAttributes();
for (int i = 0; i < attributes.getLength(); i++) {
throw new IllegalArgumentException("Cannot find namespace for " + XmlUtil.toString(element)
+ ". Prefix from content is " + prefix + ". Found namespaces " + namespaces);
}
- return Maps.immutableEntry(prefix, namespaces.get(prefix));
+ return new SimpleImmutableEntry<>(prefix, namespaces.get(prefix));
}
public List<XmlElement> getChildElementsWithSameNamespace(final String childName) throws MissingNameSpaceException {