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 com.google.common.collect.ImmutableSet;
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.AugmentationSchema;
18 import org.opendaylight.yangtools.yang.model.api.NotificationDefinition;
19 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
20 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
21 import org.opendaylight.yangtools.yang.parser.builder.util.AbstractDocumentedDataNodeContainer;
24 * @deprecated Pre-Beryllium implementation, scheduled for removal.
27 final class NotificationDefinitionImpl extends AbstractDocumentedDataNodeContainer implements NotificationDefinition {
28 private final QName qname;
29 private final SchemaPath path;
30 ImmutableSet<AugmentationSchema> augmentations;
31 ImmutableList<UnknownSchemaNode> unknownNodes;
33 NotificationDefinitionImpl(final QName qname, final SchemaPath path, final NotificationBuilder builder) {
35 // TODO Auto-generated constructor stub
41 public QName getQName() {
46 public SchemaPath getPath() {
51 public Set<AugmentationSchema> getAvailableAugmentations() {
56 public List<UnknownSchemaNode> getUnknownSchemaNodes() {
61 public int hashCode() {
64 result = prime * result + Objects.hashCode(qname);
65 result = prime * result + Objects.hashCode(path);
70 public boolean equals(final Object obj) {
77 if (getClass() != obj.getClass()) {
80 final NotificationDefinitionImpl other = (NotificationDefinitionImpl) obj;
82 if (other.qname != null) {
85 } else if (!qname.equals(other.qname)) {
89 if (other.path != null) {
92 } else if (!path.equals(other.path)) {
99 public String toString() {
100 return NotificationDefinitionImpl.class.getSimpleName() + "[qname=" + qname + ", path=" + path + "]";