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;
15 import org.opendaylight.yangtools.yang.common.QName;
16 import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
17 import org.opendaylight.yangtools.yang.model.api.NotificationDefinition;
18 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
19 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
20 import org.opendaylight.yangtools.yang.parser.builder.util.AbstractDocumentedDataNodeContainer;
22 final class NotificationDefinitionImpl extends AbstractDocumentedDataNodeContainer implements
23 NotificationDefinition {
24 private final QName qname;
25 private final SchemaPath path;
26 ImmutableSet<AugmentationSchema> augmentations;
27 ImmutableList<UnknownSchemaNode> unknownNodes;
29 NotificationDefinitionImpl(final QName qname, final SchemaPath path, final NotificationBuilder builder) {
31 // TODO Auto-generated constructor stub
37 public QName getQName() {
42 public SchemaPath getPath() {
47 public Set<AugmentationSchema> getAvailableAugmentations() {
52 public List<UnknownSchemaNode> getUnknownSchemaNodes() {
57 public int hashCode() {
60 result = prime * result + ((qname == null) ? 0 : qname.hashCode());
61 result = prime * result + ((path == null) ? 0 : path.hashCode());
66 public boolean equals(final Object obj) {
73 if (getClass() != obj.getClass()) {
76 final NotificationDefinitionImpl other = (NotificationDefinitionImpl) obj;
78 if (other.qname != null) {
81 } else if (!qname.equals(other.qname)) {
85 if (other.path != null) {
88 } else if (!path.equals(other.path)) {
95 public String toString() {
96 StringBuilder sb = new StringBuilder(NotificationDefinitionImpl.class.getSimpleName());
97 sb.append("[qname=").append(qname).append(", path=").append(path).append("]");