Populate data/ hierarchy
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / MandatoryAware.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;
9
10 /**
11  * Mix-in interface for {@link SchemaNode}s which can have a {@code mandatory} statement.
12  *
13  * @author Robert Varga
14  */
15 public interface MandatoryAware {
16
17     /**
18      * Return whether this node is mandatory or not. Note this reflects the declared model, as defined by 'mandatory'
19      * statement, not the effective model. This notably means this attribute does not mirror the definition of
20      * {@code mandatory node} as per <a href="https://tools.ietf.org/html/rfc7950#page-14">RFC7950 Terminology</a>.
21      *
22      * @return True if this node is marked as mandatory.
23      */
24     boolean isMandatory();
25 }