2 * Copyright (c) 2018 Pantheon Technologies, s.r.o. 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;
10 import com.google.common.annotations.Beta;
11 import com.google.common.base.MoreObjects;
12 import com.google.common.collect.ImmutableSet;
13 import java.util.Collection;
14 import java.util.Objects;
15 import org.opendaylight.yangtools.yang.common.QName;
16 import org.opendaylight.yangtools.yang.model.api.ActionDefinition;
17 import org.opendaylight.yangtools.yang.model.api.NotificationDefinition;
18 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
19 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
22 public abstract class AbstractEffectiveOperationContainerSchemaNode<D extends DeclaredStatement<QName>>
23 extends AbstractEffectiveContainerSchemaNode<D> {
24 protected AbstractEffectiveOperationContainerSchemaNode(final StmtContext<QName, D, ?> ctx) {
29 public final Collection<? extends ActionDefinition> getActions() {
30 return ImmutableSet.of();
34 public final Collection<? extends NotificationDefinition> getNotifications() {
35 return ImmutableSet.of();
39 public final boolean isPresenceContainer() {
40 // FIXME: this should not really be here
45 public final int hashCode() {
46 return Objects.hash(getQName(), getPath());
50 public final boolean equals(final Object obj) {
54 if (obj == null || getClass() != obj.getClass()) {
57 AbstractEffectiveOperationContainerSchemaNode<?> other = (AbstractEffectiveOperationContainerSchemaNode<?>) obj;
58 return Objects.equals(getQName(), other.getQName()) && Objects.equals(getPath(), other.getPath());
62 public final String toString() {
63 return MoreObjects.toStringHelper(this).add("path", getPath()).toString();