Make ActionNodeContainer.getActions() non-default
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / InputEffectiveStatementImpl.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective;
9
10 import com.google.common.collect.ImmutableSet;
11 import java.util.Objects;
12 import java.util.Set;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.model.api.ActionDefinition;
15 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
16 import org.opendaylight.yangtools.yang.model.api.stmt.InputStatement;
17 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
18
19 public final class InputEffectiveStatementImpl extends AbstractEffectiveContainerSchemaNode<InputStatement> {
20
21     public InputEffectiveStatementImpl(
22             final StmtContext<QName, InputStatement, EffectiveStatement<QName, InputStatement>> ctx) {
23         super(ctx);
24     }
25
26     @Override
27     public Set<ActionDefinition> getActions() {
28         return ImmutableSet.of();
29     }
30
31     @Override
32     public int hashCode() {
33         final int prime = 31;
34         int result = 1;
35         result = prime * result + Objects.hashCode(getQName());
36         result = prime * result + Objects.hashCode(getPath());
37         return result;
38     }
39
40     @Override
41     public boolean equals(final Object obj) {
42         if (this == obj) {
43             return true;
44         }
45         if (obj == null) {
46             return false;
47         }
48         if (getClass() != obj.getClass()) {
49             return false;
50         }
51         InputEffectiveStatementImpl other = (InputEffectiveStatementImpl) obj;
52         return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
53     }
54
55     @Override
56     public String toString() {
57         return "RPC input " + getQName().getLocalName();
58     }
59 }