2 * Copyright (c) 2015 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
9 package org.opendaylight.yangtools.yang.parser.builder.impl;
11 import com.google.common.collect.ImmutableList;
12 import java.util.Collections;
13 import java.util.List;
14 import java.util.Objects;
16 import org.opendaylight.yangtools.yang.common.QName;
17 import org.opendaylight.yangtools.yang.model.api.IdentitySchemaNode;
18 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
19 import org.opendaylight.yangtools.yang.model.api.Status;
20 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
23 * @deprecated Pre-Beryllium implementation, scheduled for removal.
26 final class IdentitySchemaNodeImpl implements IdentitySchemaNode {
27 private final QName qname;
28 private final SchemaPath path;
29 IdentitySchemaNode baseIdentity;
30 private final Set<IdentitySchemaNode> derivedIdentities;
34 ImmutableList<UnknownSchemaNode> unknownNodes;
36 IdentitySchemaNodeImpl(final QName qname, final SchemaPath path,
37 final Set<IdentitySchemaNode> derivedIdentities) {
40 this.derivedIdentities = derivedIdentities;
44 public QName getQName() {
49 public IdentitySchemaNode getBaseIdentity() {
54 public Set<IdentitySchemaNode> getDerivedIdentities() {
55 return Collections.unmodifiableSet(derivedIdentities);
59 public String getDescription() {
64 public String getReference() {
69 public Status getStatus() {
74 public SchemaPath getPath() {
79 public List<UnknownSchemaNode> getUnknownSchemaNodes() {
84 public int hashCode() {
87 result = prime * result + Objects.hashCode(qname);
88 result = prime * result + Objects.hashCode(path);
93 public boolean equals(final Object obj) {
100 if (getClass() != obj.getClass()) {
103 IdentitySchemaNodeImpl other = (IdentitySchemaNodeImpl) obj;
105 if (other.qname != null) {
108 } else if (!qname.equals(other.qname)) {
112 if (other.path != null) {
115 } else if (!path.equals(other.path)) {
122 public String toString() {
123 return IdentitySchemaNodeImpl.class.getSimpleName() + "[" +
124 "base=" + baseIdentity +