DeclaredStatements can contain default implementations
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / stmt / MustStatementContainer.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies, s.r.o. 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.stmt;
9
10 import java.util.Collection;
11 import javax.annotation.Nonnull;
12
13 /**
14  * Marker interface for statements which may contain a 'must' statement, as defined in RFC7950. There is a significant
15  * difference RFC6020 (YANG 1) and RFC7590 (YANG 1.1) in which statements sport this feature.
16  *
17  * @deprecated Use {@link MustStatementAwareDeclaredStatement} instead.
18  */
19 @Deprecated
20 public interface MustStatementContainer {
21     /**
22      * Return collection of {@link MustStatement}. For RFC6020, this method returns an empty collection for statements
23      * which do not allow for must statement children.
24      *
25      * @return collection of must statements
26      */
27     @Nonnull Collection<? extends MustStatement> getMusts();
28 }