2 * Copyright (c) 2016 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.stmt.rfc6020.effective;
11 import com.google.common.annotations.Beta;
12 import java.util.Objects;
13 import javax.annotation.Nonnull;
14 import org.opendaylight.yangtools.concepts.SemVer;
15 import org.opendaylight.yangtools.yang.common.QName;
16 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
17 import org.opendaylight.yangtools.yang.model.api.stmt.UnknownStatement;
18 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
21 public final class OpenconfigVersionEffectiveStatementImpl extends
22 UnknownEffectiveStatementBase<SemVer> {
24 private final SchemaPath path;
26 public OpenconfigVersionEffectiveStatementImpl(
27 final StmtContext<SemVer, UnknownStatement<SemVer>, ?> ctx) {
29 path = ctx.getParentContext().getSchemaPath().get().createChild(getNodeType());
34 public QName getQName() {
40 public SchemaPath getPath() {
45 public int hashCode() {
48 result = prime * result + Objects.hashCode(path);
49 result = prime * result + Objects.hashCode(getNodeType());
50 result = prime * result + Objects.hashCode(getNodeParameter());
55 public boolean equals(final Object obj) {
62 if (getClass() != obj.getClass()) {
65 OpenconfigVersionEffectiveStatementImpl other = (OpenconfigVersionEffectiveStatementImpl) obj;
66 if (!Objects.equals(path, other.path)) {
69 if (!Objects.equals(getNodeType(), other.getNodeType())) {
72 if (!Objects.equals(getNodeParameter(), other.getNodeParameter())) {