Propagate @NonNull collection annotations
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / Deviation.java
1 /*
2  * Copyright (c) 2013 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.model.api;
9
10 import java.util.Collection;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yangtools.yang.model.api.stmt.DeviationEffectiveStatement;
13 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
14
15 /**
16  * Interface describing YANG 'deviation' statement.
17  *
18  * <p>
19  * The 'deviation' statement defines a hierarchy of a module that the device does not implement faithfully. Deviations
20  * define the way a device deviate from a standard.
21  */
22 public interface Deviation extends DocumentedNode, EffectiveStatementEquivalent<DeviationEffectiveStatement> {
23     /**
24      * Returns target node absolute schema node identifier.
25      *
26      * @return An identifier that points to the node in the schema tree where a deviation from the module occurs.
27      */
28     default @NonNull Absolute getTargetPath() {
29         return asEffectiveStatement().argument();
30     }
31
32     /**
33      * Returns deviate children.
34      *
35      * @return Collection of all deviate statements defined in this deviation.
36      */
37     @NonNull Collection<? extends @NonNull DeviateDefinition> getDeviates();
38 }