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
8 package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.feature;
10 import static java.util.Objects.requireNonNull;
12 import java.util.Objects;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.opendaylight.yangtools.yang.common.QName;
15 import org.opendaylight.yangtools.yang.model.api.FeatureDefinition;
16 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
17 import org.opendaylight.yangtools.yang.model.api.stmt.FeatureEffectiveStatement;
18 import org.opendaylight.yangtools.yang.model.api.stmt.FeatureStatement;
19 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredEffectiveStatement.Default;
20 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementMixins.SchemaNodeMixin;
22 class EmptyFeatureEffectiveStatement extends Default<QName, FeatureStatement>
23 implements FeatureDefinition, FeatureEffectiveStatement, SchemaNodeMixin<QName, FeatureStatement> {
24 private final @NonNull SchemaPath path;
25 private final int flags;
27 EmptyFeatureEffectiveStatement(final FeatureStatement declared, final SchemaPath path, final int flags) {
29 this.path = requireNonNull(path);
34 public final int flags() {
39 public final @NonNull QName argument() {
44 public final SchemaPath getPath() {
49 public final int hashCode() {
52 result = prime * result + Objects.hashCode(getQName());
53 result = prime * result + Objects.hashCode(getPath());
58 public final boolean equals(final Object obj) {
62 if (!(obj instanceof EmptyFeatureEffectiveStatement)) {
65 final EmptyFeatureEffectiveStatement other = (EmptyFeatureEffectiveStatement) obj;
66 return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
70 public final String toString() {
71 return getClass().getSimpleName() + "[name=" + getQName() + "]";