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.model.ri.stmt.impl.eff;
10 import com.google.common.collect.ImmutableList;
11 import java.util.Collection;
12 import org.opendaylight.yangtools.yang.model.api.DeviateDefinition;
13 import org.opendaylight.yangtools.yang.model.api.Deviation;
14 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
15 import org.opendaylight.yangtools.yang.model.api.stmt.DeviationEffectiveStatement;
16 import org.opendaylight.yangtools.yang.model.api.stmt.DeviationStatement;
17 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
18 import org.opendaylight.yangtools.yang.model.spi.meta.AbstractDeclaredEffectiveStatement.DefaultArgument.WithSubstatements;
19 import org.opendaylight.yangtools.yang.model.spi.meta.EffectiveStatementMixins.DocumentedNodeMixin;
21 public final class DeviationEffectiveStatementImpl extends WithSubstatements<Absolute, DeviationStatement>
22 implements DeviationEffectiveStatement, Deviation, DocumentedNodeMixin<Absolute, DeviationStatement> {
23 public DeviationEffectiveStatementImpl(final DeviationStatement declared,
24 final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
25 super(declared, substatements);
29 public Collection<? extends DeviateDefinition> getDeviates() {
30 return filterEffectiveStatements(DeviateDefinition.class);
34 public DeviationEffectiveStatement asEffectiveStatement() {
39 public String toString() {
40 return DeviationEffectiveStatementImpl.class.getSimpleName() + "["
41 + "targetPath=" + getTargetPath()
42 + ", deviates=" + getDeviates()
43 + ", description=" + getDescription().orElse(null)
44 + ", reference=" + getReference().orElse(null)