2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.data.impl.codec;
10 import java.util.Map.Entry;
12 import org.opendaylight.yangtools.yang.common.QName;
14 public class ValueWithQName<V> implements Entry<QName, V>{
19 public ValueWithQName(QName qname, V value) {
25 public QName getQname() {
34 public QName getKey() {
39 public V setValue(V value) {
40 throw new UnsupportedOperationException();
44 public int hashCode() {
47 result = prime * result + ((qname == null) ? 0 : qname.hashCode());
48 result = prime * result + ((value == null) ? 0 : value.hashCode());
53 public boolean equals(Object obj) {
60 if (getClass() != obj.getClass()) {
63 @SuppressWarnings("rawtypes")
64 ValueWithQName other = (ValueWithQName) obj;
66 if (other.qname != null)
68 } else if (!qname.equals(other.qname))
71 if (other.value != null) {
74 } else if (!value.equals(other.value)) {