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.List;
13 import java.util.Objects;
14 import org.opendaylight.yangtools.yang.common.QName;
15 import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
16 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
17 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
18 import org.opendaylight.yangtools.yang.parser.builder.util.AbstractDocumentedDataNodeContainer;
21 * @deprecated Pre-Beryllium implementation, scheduled for removal.
24 final class GroupingDefinitionImpl extends AbstractDocumentedDataNodeContainer implements GroupingDefinition {
25 private final QName qname;
26 private final SchemaPath path;
29 ImmutableList<UnknownSchemaNode> unknownNodes;
31 GroupingDefinitionImpl(final QName qname, final SchemaPath path, final GroupingBuilderImpl builder) {
38 public QName getQName() {
43 public SchemaPath getPath() {
48 public boolean isAddedByUses() {
53 public List<UnknownSchemaNode> getUnknownSchemaNodes() {
58 public int hashCode() {
61 result = prime * result + Objects.hashCode(qname);
62 result = prime * result + Objects.hashCode(path);
67 public boolean equals(final Object obj) {
74 if (getClass() != obj.getClass()) {
77 final GroupingDefinitionImpl other = (GroupingDefinitionImpl) obj;
79 if (other.qname != null) {
82 } else if (!qname.equals(other.qname)) {
86 if (other.path != null) {
89 } else if (!path.equals(other.path)) {
96 public String toString() {
97 return GroupingDefinitionImpl.class.getSimpleName() + "[" +